Bug 1275455 - Adding in icons for containers in customisable UI menu. r=baku
authorJonathan Kingston <jkingston@mozilla.com>
Thu, 26 May 2016 04:20:23 +0100
changeset 338965 3a48b194e35bea1b0939791e3b46ac033d7a85a1
parent 338964 f746d2a857b8f5bca06a999822c085011c30f58c
child 338966 b7d82acfe62e5cd86b5bbc4111b08e1b5e0d0a6d
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1275455
milestone49.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 1275455 - Adding in icons for containers in customisable UI menu. r=baku MozReview-Commit-ID: rjXUyaMDyg
browser/components/customizableui/CustomizableWidgets.jsm
browser/themes/shared/customizableui/panelUIOverlay.inc.css
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -1141,16 +1141,17 @@ if (Services.prefs.getBoolPref("privacy.
       ContextualIdentityService.getIdentities().forEach(identity => {
         let bundle = doc.getElementById("bundle_browser");
         let label = bundle.getString(identity.label);
 
         let item = doc.createElementNS(kNSXUL, "toolbarbutton");
         item.setAttribute("label", label);
         item.setAttribute("usercontextid", identity.userContextId);
         item.setAttribute("class", "subviewbutton");
+        item.setAttribute("image", identity.icon);
 
         fragment.appendChild(item);
       });
 
       items.appendChild(fragment);
     }
   });
 }
--- a/browser/themes/shared/customizableui/panelUIOverlay.inc.css
+++ b/browser/themes/shared/customizableui/panelUIOverlay.inc.css
@@ -1445,16 +1445,21 @@ toolbaritem[overflowedItem=true],
   -moz-appearance: none;
   margin-inline-end: 3px;
 }
 
 menuitem[checked="true"].subviewbutton > .menu-iconic-left {
   visibility: hidden;
 }
 
+#PanelUI-containersItems > .subviewbutton > .toolbarbutton-icon {
+  width: 16px;
+  height: 16px;
+}
+
 .panel-mainview[panelid=customizationui-widget-panel],
 #customizationui-widget-multiview > .panel-viewcontainer,
 #customizationui-widget-multiview > .panel-viewcontainer > .panel-viewstack,
 #PanelUI-panicView > .panel-subview-body,
 #PanelUI-panicView {
   overflow: visible;
 }