diff --git a/browser/components/downloads/content/allDownloadsViewOverlay.js b/browser/components/downloads/content/allDownloadsViewOverlay.js index 021435519537..7165ee296e36 100644 --- a/browser/components/downloads/content/allDownloadsViewOverlay.js +++ b/browser/components/downloads/content/allDownloadsViewOverlay.js @@ -302,8 +302,11 @@ HistoryDownloadElementShell.prototype = { if (this.element.selected) { goUpdateDownloadCommands(); + } else { + // If a state change occurs in an item that is not currently selected, + // this is the only command that may be affected. + goUpdateCommand("downloadsCmd_clearDownloads"); } - goUpdateCommand("downloadsCmd_clearDownloads"); }, onChanged() { @@ -1136,8 +1139,7 @@ DownloadsPlacesView.prototype = { // nsIController supportsCommand(aCommand) { // Firstly, determine if this is a command that we can handle. - if (!aCommand.startsWith("cmd_") && - !aCommand.startsWith("downloadsCmd_")) { + if (!DownloadsViewUI.isCommandName(aCommand)) { return false; } if (!(aCommand in this) && @@ -1418,11 +1420,11 @@ for (let methodName of ["load", "applyFilter", "selectNode", "selectItems"]) { function goUpdateDownloadCommands() { function updateCommandsForObject(object) { for (let name in object) { - if (name.startsWith("cmd_") || name.startsWith("downloadsCmd_")) { + if (DownloadsViewUI.isCommandName(name)) { goUpdateCommand(name); } } } - updateCommandsForObject(this); + updateCommandsForObject(DownloadsPlacesView.prototype); updateCommandsForObject(HistoryDownloadElementShell.prototype); } diff --git a/browser/components/downloads/content/downloads.css b/browser/components/downloads/content/downloads.css index a15fabf448ac..04210fc7963f 100644 --- a/browser/components/downloads/content/downloads.css +++ b/browser/components/downloads/content/downloads.css @@ -177,6 +177,15 @@ richlistitem.download button { display: none; } +/* Make the panel wide enough to show the download list items without improperly + truncating them. */ +#downloadsPanel-multiView > .panel-viewcontainer, +#downloadsPanel-multiView > .panel-viewcontainer > .panel-viewstack, +#downloadsPanel-multiView > .panel-viewcontainer > .panel-viewstack > .panel-mainview { + overflow: visible; + max-width: unset; +} + /* Show the "show blocked info" button. */ #downloadsPanel-mainView .download-state[state="8"] .downloadShowBlockedInfo { display: inline; @@ -186,12 +195,12 @@ richlistitem.download button { /* The subview should be off to the right and not visible at all. */ #downloadsPanel-multiView > .panel-viewcontainer > .panel-viewstack[viewtype=main] > .panel-subviews { - transform: translateX(100%); + transform: translateX(101%); transition: transform var(--panelui-subview-transition-duration); } #downloadsPanel-multiView > .panel-viewcontainer > .panel-viewstack[viewtype=main] > .panel-subviews:-moz-locale-dir(rtl) { - transform: translateX(-100%); + transform: translateX(-101%); } /** When the subview is showing... **/ diff --git a/browser/components/downloads/content/downloadsOverlay.xul b/browser/components/downloads/content/downloadsOverlay.xul index 5932246e9660..1a7d00bee42c 100644 --- a/browser/components/downloads/content/downloadsOverlay.xul +++ b/browser/components/downloads/content/downloadsOverlay.xul @@ -134,7 +134,7 @@ onkeydown="DownloadsSummary.onKeyDown(event);" onclick="DownloadsSummary.onClick(event);"> - +