Bug 1519606 - [Linux/Gtk] Don't add margin to icon position at titlebar buttons as it's already applied at drawing, r=dao
authorMartin Stransky <stransky@redhat.com>
Wed, 23 Jan 2019 16:17:26 +0000
changeset 455230 f4f53e83954a38a7a1cc8f2c6637f5c5d2d150e7
parent 455229 2a6e063c6ea28c7703996c123c2f1bfa0b23b650
child 455231 5797d4eee0ea2bc4b97c0eaefd3d7b579302de34
push id35426
push useropoprus@mozilla.com
push dateThu, 24 Jan 2019 16:48:02 +0000
treeherdermozilla-central@0aa259de1b77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1519606
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 1519606 - [Linux/Gtk] Don't add margin to icon position at titlebar buttons as it's already applied at drawing, r=dao Differential Revision: https://phabricator.services.mozilla.com/D17347
widget/gtk/gtk3drawing.cpp
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -376,19 +376,16 @@ static void CalculateToolbarButtonSpacin
 
   if (!aMetrics->firstButton) {
     aMetrics->buttonMargin.left += buttonSpacing;
   }
   if (!aMetrics->lastButton) {
     aMetrics->buttonMargin.right += buttonSpacing;
   }
 
-  aMetrics->iconXPosition += aMetrics->buttonMargin.left;
-  aMetrics->iconYPosition += aMetrics->buttonMargin.top;
-
   aMetrics->minSizeWithBorderMargin.width +=
       aMetrics->buttonMargin.right + aMetrics->buttonMargin.left;
   aMetrics->minSizeWithBorderMargin.height +=
       aMetrics->buttonMargin.top + aMetrics->buttonMargin.bottom;
 }
 
 int GetGtkHeaderBarButtonLayout(WidgetNodeType* aButtonLayout,
                                 int aMaxButtonNums,