Bug 794752 - Downloads toolbar button changes size the first time it is clicked. r=mak.
authorMike Conley <mconley@mozilla.com>
Thu, 08 Nov 2012 11:13:23 -0500
changeset 112704 9fa862c22f51addfbd0285ddd63eb265a7b93a42
parent 112703 ac1fdaa261f2d65fd700adc53fdc4dac00be6d90
child 112705 3136d5ea2399514e8f3bc7adcbfb90dc7c44ec08
push id17731
push usermconley@mozilla.com
push dateThu, 08 Nov 2012 16:13:42 +0000
treeherdermozilla-inbound@9fa862c22f51 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs794752
milestone19.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 794752 - Downloads toolbar button changes size the first time it is clicked. r=mak.
browser/components/downloads/content/indicatorOverlay.xul
browser/locales/en-US/chrome/browser/downloads/downloads.dtd
browser/themes/gnomestripe/downloads/downloads.css
browser/themes/pinstripe/downloads/downloads.css
browser/themes/winstripe/downloads/downloads.css
--- a/browser/components/downloads/content/indicatorOverlay.xul
+++ b/browser/components/downloads/content/indicatorOverlay.xul
@@ -4,31 +4,36 @@
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this file,
    - You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://browser/content/downloads/downloads.css"?>
 <?xml-stylesheet href="chrome://browser/skin/downloads/downloads.css"?>
 
-<!DOCTYPE overlay SYSTEM "chrome://browser/locale/downloads/downloads.dtd">
+<!DOCTYPE overlay [
+  <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
+  %browserDTD;
+  <!ENTITY % downloadsDTD SYSTEM "chrome://browser/locale/downloads/downloads.dtd" >
+  %downloadsDTD;
+]>
 
 <overlay xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
          id="indicatorOverlay">
 
   <popupset>
     <!-- The downloads indicator is placed in its final toolbar location
          programmatically, and can be shown temporarily even when its
          placeholder is removed from the toolbars.  Its initial location within
          the document must not be a toolbar or the toolbar palette, otherwise the
          toolbar handling code could remove it from the document. -->
     <toolbarbutton id="downloads-indicator"
                    class="toolbarbutton-1 chromeclass-toolbar-additional"
-                   tooltiptext="&indicator.tooltiptext;"
+                   tooltiptext="&downloads.tooltip;"
                    collapsed="true"
                    oncommand="DownloadsIndicatorView.onCommand(event);"
                    ondrop="DownloadsIndicatorView.onDrop(event);"
                    ondragover="DownloadsIndicatorView.onDragOver(event);"
                    ondragenter="DownloadsIndicatorView.onDragOver(event);"
                    ondragleave="DownloadsIndicatorView.onDragLeave(event);"
                    skipintoolbarset="true">
       <!-- The panel's anchor area is smaller than the outer button, but must
--- a/browser/locales/en-US/chrome/browser/downloads/downloads.dtd
+++ b/browser/locales/en-US/chrome/browser/downloads/downloads.dtd
@@ -1,17 +1,12 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this file,
    - You can obtain one at http://mozilla.org/MPL/2.0/.  -->
 
-<!-- LOCALIZATION NOTE (indicator.tooltiptext):
-     Tooltip for the indicator that displays the progress of ongoing downloads.
-     -->
-<!ENTITY indicator.tooltiptext            "Downloads">
-
 <!-- LOCALIZATION NOTE (downloads.title):
      Used by screen readers to describe the Downloads Panel.
      -->
 <!ENTITY downloads.title                  "Downloads">
 
 <!-- LOCALIZATION NOTE (downloadDetails.width):
      Width of details for a Downloads Panel item (which directly influences the
      width of the Downloads Panel) expressed using a CSS unit. The longest
--- a/browser/themes/gnomestripe/downloads/downloads.css
+++ b/browser/themes/gnomestripe/downloads/downloads.css
@@ -155,47 +155,63 @@ richlistitem[type="download"][state="1"]
   -moz-image-region: rect(48px, 32px, 64px, 16px);
 }
 richlistitem[type="download"][state="1"]:hover > .downloadButton.downloadShow:active {
   -moz-image-region: rect(48px, 48px, 64px, 32px);
 }
 
 /*** Status and progress indicator ***/
 
-#downloads-indicator {
-  width: 35px;
-}
-
 #downloads-indicator-anchor {
-  min-width: 18px;
-  min-height: 18px;
   /* Makes the outermost stack element positioned, so that its contents are
      rendered over the main browser window in the Z order.  This is required by
      the animated event notification. */
   position: relative;
 }
 
+toolbar[iconsize="small"] #downloads-indicator-anchor {
+  min-width: 16px;
+  min-height: 16px;
+}
+
+toolbar[iconsize="large"] #downloads-indicator-anchor {
+  min-width: 24px;
+  min-height: 24px;
+}
+
 /*** Main indicator icon ***/
 
-#downloads-indicator-icon {
+toolbar[iconsize="small"] #downloads-indicator-icon {
   background: -moz-image-rect(url("chrome://browser/skin/Toolbar-small.png"),
                               0, 16, 16, 0) center no-repeat;
 }
 
+toolbar[iconsize="large"] #downloads-indicator-icon {
+  background: -moz-image-rect(url("chrome://browser/skin/Toolbar.png"),
+                              0, 24, 24, 0) center no-repeat;
+}
+
 #downloads-indicator[attention] > #downloads-indicator-anchor > #downloads-indicator-icon {
   background: -moz-image-rect(url("chrome://browser/skin/downloads/download-glow.png"),
                               16, 32, 32, 16) center no-repeat;
 }
 
-#downloads-indicator:not([counter]) > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter {
+toolbar[iconsize="small"] #downloads-indicator:not([counter]) > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter {
   background: -moz-image-rect(url("chrome://browser/skin/Toolbar-small.png"),
                               0, 16, 16, 0) center no-repeat;
   background-size: 12px;
 }
 
+toolbar[iconsize="large"] #downloads-indicator:not([counter]) > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter {
+  background: -moz-image-rect(url("chrome://browser/skin/Toolbar.png"),
+                              0, 24, 24, 0) center no-repeat;
+  background-size: 24px;
+}
+
+
 #downloads-indicator:not([counter])[attention] > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter {
   background-image: -moz-image-rect(url("chrome://browser/skin/downloads/download-glow.png"),
                                     16, 32, 32, 16);
 }
 
 /*** Event notification ***/
 
 #downloads-indicator-notification {
--- a/browser/themes/pinstripe/downloads/downloads.css
+++ b/browser/themes/pinstripe/downloads/downloads.css
@@ -152,20 +152,16 @@ richlistitem[type="download"][state="1"]
 }
 
 .downloadButton.downloadRetry {
   -moz-image-region: rect(32px, 16px, 48px, 0px);
 }
 
 /*** Status and progress indicator ***/
 
-#downloads-indicator {
-  width: 35px;
-}
-
 #downloads-indicator-anchor {
   min-width: 20px;
   min-height: 20px;
   /* Makes the outermost stack element positioned, so that its contents are
      rendered over the main browser window in the Z order.  This is required by
      the animated event notification. */
   position: relative;
 }
--- a/browser/themes/winstripe/downloads/downloads.css
+++ b/browser/themes/winstripe/downloads/downloads.css
@@ -154,34 +154,30 @@ richlistitem[type="download"][state="1"]
 }
 
 %ifdef WINSTRIPE_AERO
 }
 %endif
 
 /*** Status and progress indicator ***/
 
-#downloads-indicator {
-  width: 35px;
-}
-
 #downloads-indicator-anchor {
-  min-width: 18px;
-  min-height: 18px;
   /* Makes the outermost stack element positioned, so that its contents are
      rendered over the main browser window in the Z order.  This is required by
      the animated event notification. */
   position: relative;
 }
 
 /*** Main indicator icon ***/
 
 #downloads-indicator-icon {
   background: -moz-image-rect(url("chrome://browser/skin/Toolbar.png"),
                               0, 108, 18, 90) center no-repeat;
+  min-width: 18px;
+  min-height: 18px;
 }
 
 #downloads-indicator-icon:-moz-lwtheme-brighttext {
   background: -moz-image-rect(url("chrome://browser/skin/Toolbar-inverted.png"),
                               0, 108, 18, 90) center no-repeat;
 }
 
 #downloads-indicator[attention] > #downloads-indicator-anchor > #downloads-indicator-icon {