From 8d1ad482b6b42f634352b505b0301d75343cdc33 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 31 Jan 2021 21:11:42 -0800 Subject: [PATCH] Fix wxStatusBar size grip layout with GTK3 --- src/generic/statusbr.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 4993a3f23f..8bd9726d00 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -389,9 +389,11 @@ wxRect wxStatusBarGeneric::GetSizeGripRect() const int width, height; wxWindow::DoGetClientSize(&width, &height); +#ifndef __WXGTK3__ if (GetLayoutDirection() == wxLayout_RightToLeft) return wxRect(2, 2, height-2, height-4); - else +#endif + return wxRect(width-height-2, 2, height-2, height-4); } @@ -419,10 +421,6 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) ) GtkStyleContext* sc = gtk_widget_get_style_context(toplevel); gtk_style_context_save(sc); gtk_style_context_add_class(sc, GTK_STYLE_CLASS_GRIP); - GtkJunctionSides sides = GTK_JUNCTION_CORNER_BOTTOMRIGHT; - if (GetLayoutDirection() == wxLayout_RightToLeft) - sides = GTK_JUNCTION_CORNER_BOTTOMLEFT; - gtk_style_context_set_junction_sides(sc, sides); gtk_render_handle(sc, static_cast(dc.GetImpl()->GetCairoContext()), rc.x, rc.y, rc.width, rc.height);