Fix GTK window position when closed maximized
GTK only sends one maximize event, and it happens after the window is maximized, so we shouldn't check for not being maximized.
This commit is contained in:
parent
5b3d947b7e
commit
96a5a96037
|
@ -171,12 +171,12 @@ void DIALOG_COLOR_PICKER::initDefinedColors( CUSTOM_COLORS_LIST* aPredefinedColo
|
|||
// Size of color swatches
|
||||
const int w = 32, h = 32;
|
||||
|
||||
// Colors are built from the g_ColorRefs table (size NBCOLORS).
|
||||
// The look is better when g_ColorRefs order is displayed in a grid matrix
|
||||
// Colors are built from the colorRefs() table (size NBCOLORS).
|
||||
// The look is better when colorRefs() order is displayed in a grid matrix
|
||||
// of 6 row and 5 columns, first filling a row, and after the next column.
|
||||
// But the wxFlexGrid used here must be filled by columns, then next row
|
||||
// the best interval g_ColorRefs from a matrix row to the next row is 6
|
||||
// So when have to reorder the index used to explore g_ColorRefs
|
||||
// the best interval colorRefs() from a matrix row to the next row is 6
|
||||
// So when have to reorder the index used to explore colorRefs()
|
||||
int grid_col = 0;
|
||||
int grid_row = 0;
|
||||
int table_row_count = 6;
|
||||
|
|
|
@ -823,9 +823,11 @@ void EDA_BASE_FRAME::OnMaximize( wxMaximizeEvent& aEvent )
|
|||
// When we maximize the window, we want to save the old information
|
||||
// so that we can add it to the settings on next window load.
|
||||
// Contrary to the documentation, this event seems to be generated
|
||||
// when the window is also being unmaximized, so we only capture the
|
||||
// size information when we maximize the window.
|
||||
// when the window is also being unmaximized on OSX, so we only
|
||||
// capture the size information when we maximize the window when on OSX.
|
||||
#ifdef __WXOSX__
|
||||
if( !IsMaximized() )
|
||||
#endif
|
||||
{
|
||||
m_NormalFrameSize = GetWindowSize();
|
||||
m_NormalFramePos = GetPosition();
|
||||
|
|
|
@ -73,7 +73,7 @@ enum EDA_COLOR_T
|
|||
PUREYELLOW,
|
||||
NBCOLORS, ///< Number of colors
|
||||
HIGHLIGHT_FLAG = ( 1<<19 ),
|
||||
MASKCOLOR = 31 ///< mask for color index into g_ColorRefs[]
|
||||
MASKCOLOR = 31 ///< mask for color index into colorRefs()[]
|
||||
};
|
||||
|
||||
struct StructColors
|
||||
|
|
Loading…
Reference in New Issue