From 3475c86d5f7f1635a8f37765eb45084c24d92615 Mon Sep 17 00:00:00 2001 From: Mike Conley Date: Thu, 8 Nov 2012 11:13:23 -0500 Subject: [PATCH] Bug 794752 - Downloads toolbar button changes size the first time it is clicked. r=mak. --- .../downloads/content/indicatorOverlay.xul | 9 ++++-- .../chrome/browser/downloads/downloads.dtd | 5 --- .../gnomestripe/downloads/downloads.css | 32 ++++++++++++++----- .../themes/pinstripe/downloads/downloads.css | 4 --- .../themes/winstripe/downloads/downloads.css | 8 ++--- 5 files changed, 33 insertions(+), 25 deletions(-) diff --git a/browser/components/downloads/content/indicatorOverlay.xul b/browser/components/downloads/content/indicatorOverlay.xul index bb62229e7f9..05defb37fde 100644 --- a/browser/components/downloads/content/indicatorOverlay.xul +++ b/browser/components/downloads/content/indicatorOverlay.xul @@ -9,7 +9,12 @@ - + + %browserDTD; + + %downloadsDTD; +]> - - - diff --git a/browser/themes/gnomestripe/downloads/downloads.css b/browser/themes/gnomestripe/downloads/downloads.css index c7d61a20ddc..22f3c920ae0 100644 --- a/browser/themes/gnomestripe/downloads/downloads.css +++ b/browser/themes/gnomestripe/downloads/downloads.css @@ -160,37 +160,53 @@ richlistitem[type="download"][state="1"]:hover > .downloadButton.downloadShow:ac /*** 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); diff --git a/browser/themes/pinstripe/downloads/downloads.css b/browser/themes/pinstripe/downloads/downloads.css index e506857def3..4e5b0d5d1a7 100644 --- a/browser/themes/pinstripe/downloads/downloads.css +++ b/browser/themes/pinstripe/downloads/downloads.css @@ -157,10 +157,6 @@ richlistitem[type="download"][state="1"]:hover > .downloadButton.downloadShow:ac /*** Status and progress indicator ***/ -#downloads-indicator { - width: 35px; -} - #downloads-indicator-anchor { min-width: 20px; min-height: 20px; diff --git a/browser/themes/winstripe/downloads/downloads.css b/browser/themes/winstripe/downloads/downloads.css index c909b914dd5..0e17f10e277 100644 --- a/browser/themes/winstripe/downloads/downloads.css +++ b/browser/themes/winstripe/downloads/downloads.css @@ -159,13 +159,7 @@ richlistitem[type="download"][state="1"]:hover > .downloadButton.downloadShow:ac /*** 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. */ @@ -177,6 +171,8 @@ richlistitem[type="download"][state="1"]:hover > .downloadButton.downloadShow:ac #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 {