Bug 880918 - add a toolbarbutton sub-binding that wraps labels, r=dao,Enn
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 19 Jul 2013 09:18:17 +0200
changeset 155571 0b6c881ba74cbe77c6a317463b0459dda7d59c9c
parent 155570 4883dc0017a149b88ae98b57da2272ec9422665b
child 155572 dfa1450dd6072de49960438af7ad1fcce67b63cf
push id25666
push userjwein@mozilla.com
push dateMon, 18 Nov 2013 15:56:58 +0000
treeherdermozilla-central@f2adb62d07eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao, Enn
bugs880918
milestone25.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 880918 - add a toolbarbutton sub-binding that wraps labels, r=dao,Enn
toolkit/content/widgets/toolbarbutton.xml
toolkit/content/xul.css
--- a/toolkit/content/widgets/toolbarbutton.xml
+++ b/toolkit/content/widgets/toolbarbutton.xml
@@ -75,10 +75,20 @@
   </binding>
 
   <binding id="toolbarbutton-image"
            extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton">
     <content>
       <xul:image class="toolbarbutton-icon" xbl:inherits="src=image"/>
     </content>
   </binding>
+
+  <binding id="toolbarbutton-wrapping-label"
+           extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton">
+    <content>
+      <children includes="observes|template|menupopup|panel|tooltip"/>
+      <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label"/>
+      <xul:label class="toolbarbutton-text" flex="1"
+                 xbl:inherits="xbl:text=label"/>
+    </content>
+  </binding>
     
 </bindings>
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -152,16 +152,20 @@ toolbarbutton[type="menu"],
 toolbarbutton[type="panel"] {
   -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu");
 }
 
 toolbarbutton[type="menu-button"] {
   -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu-button");
 }
 
+toolbarbutton[type="wrap"] {
+  -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-wrapping-label");
+}
+
 toolbar[mode="icons"] .toolbarbutton-text,
 toolbar[mode="text"] .toolbarbutton-icon {
   display: none;
 }
 
 /******** browser, editor, iframe ********/
 
 browser,