From b1ab79d5ad823295f1fe8738527236fb704d5ea1 Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Sun, 12 Mar 2017 20:01:45 +0100 Subject: [PATCH] make download views works right even in Nightly --- .../downloads/allDownloadsViewOverlay.css | 75 +++---------------- LCARStrek/browser/downloads/downloads.css | 42 +++++++++++ 2 files changed, 52 insertions(+), 65 deletions(-) diff --git a/LCARStrek/browser/downloads/allDownloadsViewOverlay.css b/LCARStrek/browser/downloads/allDownloadsViewOverlay.css index 4ac7d8e0..2ebb1b11 100644 --- a/LCARStrek/browser/downloads/allDownloadsViewOverlay.css +++ b/LCARStrek/browser/downloads/allDownloadsViewOverlay.css @@ -20,7 +20,6 @@ #downloadsRichListBox > richlistitem.download { height: var(--downloads-item-height); - padding: 5px 8px; } .downloadTypeIcon { @@ -62,6 +61,14 @@ richlistitem.download > toolbarseparator { margin: 4px 0 calc(1em / 0.95 - 1em); } +.downloadDetailsNormal, +.downloadDetailsHover, +.downloadOpenFile, +.downloadShowMoreInfo, +.downloadButtonLabels { + display: none; +} + .downloadButton { -moz-box-align: center; background: transparent; @@ -69,8 +76,8 @@ richlistitem.download > toolbarseparator { min-height: 0; margin: 0; border: none; - padding: 0 18px; color: inherit; + padding: 0 18px; } .downloadButton > .button-box { @@ -83,7 +90,7 @@ richlistitem.download > toolbarseparator { width: 16px; height: 16px; margin: 0; - filter: url("chrome://browser/skin/filters.svg#fill"); + filter: url("chrome://global/skin/filters.svg#fill"); fill: currentColor; } @@ -134,65 +141,3 @@ richlistitem.download[selected] > .downloadButtonArea > .downloadButton:hover:ac :root { --downloads-item-height: 6em; } - -/*** Highlighted list items ***/ - -richlistitem.download:not([selected]):hover { - border-radius: 3px; - background-color: #794900; - color: #FFCF00; - cursor: pointer; -} - -/*** Button icons ***/ - -.downloadButton.downloadIconCancel { - -moz-image-region: rect(0px, 16px, 16px, 0px); -} - -richlistitem.download:hover > .downloadButton.downloadIconCancel, -richlistitem.download:hover > .downloadButton.downloadIconCancel:hover, -richlistitem.download:hover > .downloadButton.downloadIconCancel:active { - -moz-image-region: rect(0px, 32px, 16px, 16px); -} - -.downloadButton.downloadIconShow { - -moz-image-region: rect(16px, 16px, 32px, 0px); -} - -richlistitem.download:hover > .downloadButton.downloadIconShow, -richlistitem.download:hover > .downloadButton.downloadIconShow:hover, -richlistitem.download:hover > .downloadButton.downloadIconShow:active { - -moz-image-region: rect(16px, 32px, 32px, 16px); -} - -.downloadButton.downloadIconRetry { - -moz-image-region: rect(32px, 16px, 48px, 0px); -} - -richlistitem.download:hover > .downloadButton.downloadIconRetry, -richlistitem.download:hover > .downloadButton.downloadIconRetry:hover, -richlistitem.download:hover > .downloadButton.downloadIconRetry:active { - -moz-image-region: rect(32px, 32px, 48px, 16px); -} - -richlistitem.download[selected] > .downloadButton.downloadIconCancel, -richlistitem.download[selected]:hover > .downloadButton.downloadIconCancel, -richlistitem.download[selected]:hover > .downloadButton.downloadIconCancel:hover, -richlistitem.download[selected]:hover > .downloadButton.downloadIconCancel:active { - -moz-image-region: rect(0px, 32px, 16px, 16px); -} - -richlistitem.download[selected] > .downloadButton.downloadIconShow, -richlistitem.download[selected]:hover > .downloadButton.downloadIconShow, -richlistitem.download[selected]:hover > .downloadButton.downloadIconShow:hover, -richlistitem.download[selected]:hover > .downloadButton.downloadIconShow:active { - -moz-image-region: rect(16px, 32px, 32px, 16px); -} - -richlistitem.download[selected] > .downloadButton.downloadIconRetry, -richlistitem.download[selected]:hover > .downloadButton.downloadIconRetry, -richlistitem.download[selected]:hover > .downloadButton.downloadIconRetry:hover, -richlistitem.download[selected]:hover > .downloadButton.downloadIconRetry:active { - -moz-image-region: rect(32px, 32px, 48px, 16px); -} diff --git a/LCARStrek/browser/downloads/downloads.css b/LCARStrek/browser/downloads/downloads.css index e1be297a..5d9e8485 100644 --- a/LCARStrek/browser/downloads/downloads.css +++ b/LCARStrek/browser/downloads/downloads.css @@ -213,6 +213,48 @@ richlistitem[type="download"][verdict="Uncommon"] .downloadBlockedBadge { margin: 4px 0 calc(1em / var(--downloads-item-font-size-factor) - 1em); } +/* The following rules control which message is shown under the name of the + download, using a set of elements that share the class ".downloadDetails". + At any given time, only one of these elements is displayed. We use a set of + rules to hide the elements that shouldn't be displayed in each case. */ + +/* The full status message is only displayed in the Downloads View. */ +.downloadDetailsFull { + display: none; +} + +/* When hovering the mouse pointer over the item, instead of the normal message + we display a more detailed one. */ +richlistitem[type="download"]:hover > .downloadMainArea > .downloadContainer > .downloadDetailsNormal, +richlistitem[type="download"]:not(:hover) > .downloadMainArea > .downloadContainer > .downloadDetailsHover { + display: none; +} + +/* When hovering the action button in particular, instead of the usual hover + message we display the command associated with the button. */ +richlistitem[type="download"].downloadHoveringButton > .downloadMainArea > .downloadContainer > .downloadDetailsHover, +richlistitem[type="download"]:not(.downloadHoveringButton) > .downloadMainArea > .downloadContainer > .downloadButtonLabels { + display: none; +} + +/* When hovering the main area of a finished download whose target exists, + instead of the usual hover message we display the "Open File" command. */ +richlistitem[type="download"][state="1"][exists] > .downloadMainArea:hover > .downloadContainer > .downloadDetailsHover, +richlistitem[type="download"]:not([state="1"]) > .downloadMainArea > .downloadContainer > .downloadOpenFile, +richlistitem[type="download"]:not([exists]) > .downloadMainArea > .downloadContainer > .downloadOpenFile, +.downloadMainArea:not(:hover) > .downloadContainer > .downloadOpenFile { + display: none; +} + +/* When hovering items blocked by Application Reputation, instead of the other + hover messages we display the "Show more information" label. */ +richlistitem[type="download"][verdict] > .downloadMainArea > .downloadContainer > .downloadDetailsHover, +richlistitem[type="download"][verdict] > .downloadMainArea > .downloadContainer > .downloadButtonLabels, +richlistitem[type="download"]:not([verdict]) > .downloadMainArea > .downloadContainer > .downloadShowMoreInfo, +richlistitem[type="download"]:not(:hover) > .downloadMainArea > .downloadContainer > .downloadShowMoreInfo { + display: none; +} + richlistitem[type="download"][verdict] > toolbarseparator { visibility: hidden; } -- 2.35.3