X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9dc44eff0235c5f30940f32ccc6d9d82a236e7d2..bf2c43c76e2819be443ab1d830ab68d9569d66b1:/src/generic/statusbr.cpp diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index b2a98212b2..6de10c46aa 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Francesco Montorsi // Created: 01/02/97 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -291,10 +290,10 @@ void wxStatusBarGeneric::DrawField(wxDC& dc, int i, int textHeight) return; // happens when the status bar is shrunk in a very small area! int style = m_panes[i].GetStyle(); - if (style != wxSB_FLAT) + if (style == wxSB_RAISED || style == wxSB_SUNKEN) { // Draw border - // For wxSB_NORMAL: paint a grey background, plus 3-d border (one black rectangle) + // For wxSB_SUNKEN: paint a grey background, plus 3-d border (one black rectangle) // Inside this, left and top sides (dark grey). Bottom and right (white). // Reverse it for wxSB_RAISED @@ -436,7 +435,9 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) ) const wxRect& rc = GetSizeGripRect(); #ifdef __WXGTK3__ GtkWidget* toplevel = gtk_widget_get_toplevel(m_widget); - if (toplevel && !gtk_window_get_has_resize_grip(GTK_WINDOW(toplevel))) + GdkRectangle rect; + if (toplevel && (!gtk_window_get_resize_grip_area(GTK_WINDOW(toplevel), &rect) || + rect.width == 0 || rect.height == 0)) { GtkStyleContext* sc = gtk_widget_get_style_context(toplevel); gtk_style_context_save(sc); @@ -493,8 +494,12 @@ void wxStatusBarGeneric::OnLeftDown(wxMouseEvent& event) GtkWidget* ancestor = gtk_widget_get_toplevel(m_widget); #ifdef __WXGTK3__ - if (ancestor && gtk_window_get_has_resize_grip(GTK_WINDOW(ancestor))) + GdkRectangle rect; + if (ancestor && gtk_window_get_resize_grip_area(GTK_WINDOW(ancestor), &rect) && + rect.width && rect.height) + { ancestor = NULL; + } #endif if (ancestor && ShowsSizeGrip() && event.GetX() > width - height) @@ -537,8 +542,12 @@ void wxStatusBarGeneric::OnRightDown(wxMouseEvent& event) GtkWidget* ancestor = gtk_widget_get_toplevel(m_widget); #ifdef __WXGTK3__ - if (ancestor && gtk_window_get_has_resize_grip(GTK_WINDOW(ancestor))) + GdkRectangle rect; + if (ancestor && gtk_window_get_resize_grip_area(GTK_WINDOW(ancestor), &rect) && + rect.width && rect.height) + { ancestor = NULL; + } #endif if (ancestor && ShowsSizeGrip() && event.GetX() > width - height)