re-enable using our own resize grip with GTK3, themes can (and do) disable the native grip
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -436,7 +436,9 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) )
|
|||||||
const wxRect& rc = GetSizeGripRect();
|
const wxRect& rc = GetSizeGripRect();
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
GtkWidget* toplevel = gtk_widget_get_toplevel(m_widget);
|
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);
|
GtkStyleContext* sc = gtk_widget_get_style_context(toplevel);
|
||||||
gtk_style_context_save(sc);
|
gtk_style_context_save(sc);
|
||||||
@@ -493,8 +495,12 @@ void wxStatusBarGeneric::OnLeftDown(wxMouseEvent& event)
|
|||||||
|
|
||||||
GtkWidget* ancestor = gtk_widget_get_toplevel(m_widget);
|
GtkWidget* ancestor = gtk_widget_get_toplevel(m_widget);
|
||||||
#ifdef __WXGTK3__
|
#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;
|
ancestor = NULL;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ancestor && ShowsSizeGrip() && event.GetX() > width - height)
|
if (ancestor && ShowsSizeGrip() && event.GetX() > width - height)
|
||||||
@@ -537,8 +543,12 @@ void wxStatusBarGeneric::OnRightDown(wxMouseEvent& event)
|
|||||||
|
|
||||||
GtkWidget* ancestor = gtk_widget_get_toplevel(m_widget);
|
GtkWidget* ancestor = gtk_widget_get_toplevel(m_widget);
|
||||||
#ifdef __WXGTK3__
|
#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;
|
ancestor = NULL;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ancestor && ShowsSizeGrip() && event.GetX() > width - height)
|
if (ancestor && ShowsSizeGrip() && event.GetX() > width - height)
|
||||||
|
Reference in New Issue
Block a user