X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc402e6431b66a8eb7d567caa55a1bece42902b7..3d2eaa5d5917bedbf5b5a54a24d7559fd1e5df67:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index be6e24913e..bfb8c228f8 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3009,13 +3009,13 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags } // calculate the best size if we should auto size the window - if ( (sizeFlags & wxSIZE_AUTO_WIDTH) || - (sizeFlags & wxSIZE_AUTO_HEIGHT) ) + if ( ((sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1) || + ((sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1) ) { const wxSize sizeBest = GetBestSize(); - if ( sizeFlags & wxSIZE_AUTO_WIDTH ) + if ( (sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1 ) width = sizeBest.x; - if ( sizeFlags & wxSIZE_AUTO_HEIGHT ) + if ( (sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1 ) height = sizeBest.y; } @@ -3904,7 +3904,7 @@ void wxWindowGTK::GtkSendPaintEvents() g_eraseGC = gdk_gc_new( pizza->bin_window ); gdk_gc_set_fill( g_eraseGC, GDK_SOLID ); } - gdk_gc_set_foreground( g_eraseGC, m_backgroundColour.GetColor() ); + gdk_gc_set_foreground( g_eraseGC, GetBackgroundColour().GetColor() ); wxRegionIterator upd( m_clearRegion ); while (upd) @@ -4206,7 +4206,7 @@ void wxWindowGTK::SetWidgetStyle() } } - if ( m_hasBgCol ) + if ( m_hasBgCol && m_backgroundColour.Ok() ) { m_backgroundColour.CalcPixel( gtk_widget_get_colormap( m_widget ) ); if (m_backgroundColour != wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE))