X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/428f4657b6c1747e28abeb3b9c2069512b2997d7..a187b3619e23484775496952eb21cbbfd2f40c21:/src/gtk/renderer.cpp diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp index f1cd95c856..2c8c94ee1e 100644 --- a/src/gtk/renderer.cpp +++ b/src/gtk/renderer.cpp @@ -46,7 +46,9 @@ public: virtual void DrawHeaderButton(wxWindow *win, wxDC& dc, const wxRect& rect, - int flags = 0); + int flags = 0, + wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, + wxHeaderButtonParams* params = NULL); // draw the expanded/collapsed icon for a tree control item virtual void DrawTreeItemButton(wxWindow *win, @@ -183,11 +185,17 @@ void wxRendererGTK::DrawHeaderButton(wxWindow *win, wxDC& dc, const wxRect& rect, - int flags) + int flags, + wxHeaderSortIconType sortArrow, + wxHeaderButtonParams* params) { GtkWidget *button = GetButtonWidget(); + int x_diff = 0; + if (win->GetLayoutDirection() == wxLayout_RightToLeft) + x_diff = rect.width; + gtk_paint_box ( button->style, @@ -199,8 +207,10 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win, NULL, button, "button", - dc.LogicalToDeviceX(rect.x), rect.y, rect.width, rect.height + dc.LogicalToDeviceX(rect.x) - x_diff, rect.y, rect.width, rect.height ); + + DrawHeaderButtonContents(win, dc, rect, flags, sortArrow, params); } // draw a ">" or "v" button