Bug 1497002 - [Linux/CSD] Position headerbar button icons according to the actual button, r=jhorak
authorMartin Stransky <stransky@redhat.com>
Fri, 11 Jan 2019 11:24:06 +0000
changeset 453451 9a22edb5c335044baf5fd63f28553d5f6cfb4103
parent 453450 ebee32dc7abedd8621353f4ee27af9cf077e427e
child 453452 fc6fa6ebad8670134a9fca57ec7d7f1c9b60f4d1
push id35357
push usernerli@mozilla.com
push dateFri, 11 Jan 2019 21:54:07 +0000
treeherdermozilla-central@0ce024c91511 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjhorak
bugs1497002
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1497002 - [Linux/CSD] Position headerbar button icons according to the actual button, r=jhorak Differential Revision: https://phabricator.services.mozilla.com/D16193
widget/gtk/gtk3drawing.cpp
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -565,18 +565,19 @@ static gint moz_gtk_header_bar_button_pa
     const ToolbarButtonGTKMetrics* metrics =
         GetToolbarButtonMetrics(buttonWidgetType);
 
     /* This is available since Gtk+ 3.10 as well as GtkHeaderBar */
     static auto sGtkRenderIconSurfacePtr =
         (void (*)(GtkStyleContext*, cairo_t*, cairo_surface_t*, gdouble,
                   gdouble))dlsym(RTLD_DEFAULT, "gtk_render_icon_surface");
 
-    sGtkRenderIconSurfacePtr(style, cr, surface, metrics->iconXPosition,
-                             metrics->iconYPosition);
+    sGtkRenderIconSurfacePtr(style, cr, surface,
+                             rect->x + metrics->iconXPosition,
+                             rect->y + metrics->iconYPosition);
     gtk_style_context_restore(style);
   }
 
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_toggle_paint(cairo_t* cr, GdkRectangle* rect,
                                  GtkWidgetState* state, gboolean selected,