toolbarbutton overflow draft
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 22 Jun 2016 16:45:39 +1200
changeset 645151 571aa087923903179536a5ebaff8577e5141e534
parent 645150 ee434b28e6f5f3ab01f4388c2c964338a8046a3e
child 645152 620ae8e576261f50ad052f7330cdc68c4e48a310
push id73684
push userktomlinson@mozilla.com
push dateFri, 11 Aug 2017 22:29:12 +0000
milestone57.0a1
toolbarbutton overflow MozReview-Commit-ID: AuSqQ4ypD5N
widget/gtk/nsNativeThemeGTK.cpp
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
@@ -1041,28 +1041,35 @@ nsNativeThemeGTK::GetExtraSizeForWidget(
       }
 
       aExtra->top = indicator_spacing;
       aExtra->right = indicator_spacing;
       aExtra->bottom = indicator_spacing;
       aExtra->left = indicator_spacing;
       break;
     }
-  case NS_THEME_BUTTON :
+  case NS_THEME_BUTTON:
+  case NS_THEME_TOOLBARBUTTON:
     {
       if (IsDefaultButton(aFrame)) {
         // Some themes draw a default indicator outside the widget,
         // include that in overflow
         gint top, left, bottom, right;
         moz_gtk_button_get_default_overflow(&top, &left, &bottom, &right);
         aExtra->top = top;
         aExtra->right = right;
         aExtra->bottom = bottom;
         aExtra->left = left;
         break;
+      } else {
+        aExtra->top = 2;
+        aExtra->right = 2;
+        aExtra->bottom = 2;
+        aExtra->left = 2;
+        break;
       }
       return false;
     }
   case NS_THEME_FOCUS_OUTLINE:
     {
       moz_gtk_get_focus_outline_size(&aExtra->left, &aExtra->top);
       aExtra->right = aExtra->left;
       aExtra->bottom = aExtra->top;