diff --git a/chrome/content/zotero-platform/mac/overlay.css b/chrome/content/zotero-platform/mac/overlay.css index ace263648..016661926 100644 --- a/chrome/content/zotero-platform/mac/overlay.css +++ b/chrome/content/zotero-platform/mac/overlay.css @@ -2,6 +2,14 @@ As of Fx36, the built-in Mac styles don't properly handle a menu-button within a combined button, so we need this ungodly mess. */ +/* Necessary to keep 32px icons from being rendered at full size */ +#zotero-toolbar-main-button[cui-areatype="toolbar"] > .toolbarbutton-icon, +#zotero-toolbar-main-button-single[cui-areatype="toolbar"] > .toolbarbutton-icon, +#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon, +#zotero-toolbar-save-button-single[cui-areatype="toolbar"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon { + height: 16px; +} + #zotero-toolbar-buttons[cui-areatype="toolbar"] > separator, #zotero-toolbar-save-button[cui-areatype="toolbar"]:not(:hover) > .toolbarbutton-menubutton-dropmarker::before, #zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button { @@ -9,12 +17,7 @@ } #zotero-toolbar-save-button[cui-areatype="toolbar"] { - margin-top: 3px !important; - margin-bottom: 3px !important; - border-right: 0; - border-width: 1px; - border-style: solid; - border-color: transparent; + border: 0; } #zotero-toolbar-main-button[cui-areatype="toolbar"] { @@ -26,8 +29,6 @@ } #zotero-toolbar-save-button[cui-areatype="toolbar"] { - margin-top: 3px; - margin-bottom: 3px; margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; @@ -40,8 +41,11 @@ padding-right: 1px; } -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button, -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker { +/* + * Recreate standard hover effect (except in overflow list) + */ +#zotero-toolbar-buttons[cui-areatype="toolbar"]:not([overflowedItem=true]):hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button, +#zotero-toolbar-buttons[cui-areatype="toolbar"]:not([overflowedItem=true]):hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker { border-width: 1px; border-style: solid; border-color: var(--toolbarbutton-hover-bordercolor) !important; @@ -50,43 +54,47 @@ border-bottom-left-radius: 0; } -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker::before { +#zotero-toolbar-buttons[cui-areatype="toolbar"]:not([overflowedItem=true]):hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker::before { background: none; } -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button { +#zotero-toolbar-buttons[cui-areatype="toolbar"]:not([overflowedItem=true]):hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button { border-right: 1px solid transparent; } -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker { +#zotero-toolbar-buttons[cui-areatype="toolbar"]:not([overflowedItem=true]):hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker { border-left: 1px solid transparent; } -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > .toolbarbutton-menubutton-dropmarker { +#zotero-toolbar-buttons[cui-areatype="toolbar"]:not([overflowedItem=true]):hover > .toolbarbutton-menubutton-dropmarker { background: inherit; } -#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker:hover { +#zotero-toolbar-save-button[cui-areatype="toolbar"]:not([overflowedItem=true]) > .toolbarbutton-menubutton-dropmarker:hover { background: var(--toolbarbutton-hover-background); } #zotero-toolbar-main-button[cui-areatype="toolbar"] { border-right: 1px solid transparent; } -#zotero-toolbar-save-button[cui-areatype="toolbar"]:hover { +#zotero-toolbar-save-button[cui-areatype="toolbar"]:not([overflowedItem=true]):hover { border-left: 0 solid transparent; } -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button { +#zotero-toolbar-buttons[cui-areatype="toolbar"]:not([overflowedItem=true]):hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button { border-left: 1px solid transparent; } -/* Necessary in Fx36 to keep 32px icons from being rendered at full size */ -#zotero-toolbar-main-button[cui-areatype="toolbar"] > .toolbarbutton-icon, -#zotero-toolbar-main-button-single[cui-areatype="toolbar"] > .toolbarbutton-icon, -#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon, -#zotero-toolbar-save-button-single[cui-areatype="toolbar"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon { - width: 16px; +/* + * Alterations for overflow menu + */ +#zotero-toolbar-buttons[overflowedItem=true] { + margin: 6px 4px 0; } + +#zotero-toolbar-buttons[overflowedItem=true] #zotero-toolbar-main-button { + max-width: 16px; +} + /* End toolbar icons */ #zotero-splitter diff --git a/chrome/content/zotero-platform/mac/standalone/menuOverlay.xul b/chrome/content/zotero-platform/mac/standalone/menuOverlay.xul index 0f43a3e99..fb58c842c 100644 --- a/chrome/content/zotero-platform/mac/standalone/menuOverlay.xul +++ b/chrome/content/zotero-platform/mac/standalone/menuOverlay.xul @@ -84,7 +84,7 @@ + oncommand="Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow('navigator:browser').ZoteroPane.openPreferences();"/> .toolbarbutton-menubutton-button { +toolbar[id="nav-bar"] #zotero-toolbar-save-button > .toolbarbutton-menubutton-button { padding-left: 0; } -#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-button .toolbarbutton-icon { +toolbar[id="nav-bar"] #zotero-toolbar-save-button > .toolbarbutton-menubutton-button .toolbarbutton-icon { padding-left: 6px !important; padding-right: 6px !important; } -#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker { +toolbar[id="nav-bar"] #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker { + width: 18px !important; margin-top: 6px; margin-bottom: 6px; } -#zotero-toolbar-save-button[cui-areatype="toolbar"]:hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon, -#zotero-toolbar-save-button[cui-areatype="toolbar"][open] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon { - margin-top: 0; - margin-bottom: 0; -} - -#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker .dropmarker-icon { +toolbar[id="nav-bar"] #zotero-toolbar-buttons #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker .dropmarker-icon { padding-left: 14px !important; padding-right: 3px !important; } -#zotero-toolbar-save-button-single[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon { +toolbar[id="nav-bar"] #zotero-toolbar-save-button-single > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon { + margin-top: 3px; + margin-bottom: 3px; + padding-left: 8px !important; + padding-right: 8px !important; +} + +toolbar[id="nav-bar"] #zotero-toolbar-save-button:hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon, +toolbar[id="nav-bar"] #zotero-toolbar-save-button[open] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon { + margin-top: 0; + margin-bottom: 0; +} + +toolbar[id="nav-bar"] #zotero-toolbar-save-button-single > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon { margin-top: 3px; margin-bottom: 3px; } -#zotero-toolbar-buttons[cui-areatype="toolbar"] > separator { +toolbar[id="nav-bar"] #zotero-toolbar-buttons > separator { /* Copied from .toolbarbutton-menubutton-dropmarker::before */ display: -moz-box; width: 1px; @@ -70,31 +86,78 @@ box-shadow: var(--toolbarbutton-combined-boxshadow); } -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-main-button .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button .dropmarker-icon { +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-main-button .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-save-button .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-save-button .dropmarker-icon { border-color: var(--toolbarbutton-hover-bordercolor) !important; } -#zotero-toolbar-save-button[cui-areatype="toolbar"]:hover:not(:active) > .toolbarbutton-menubutton-button > .toolbarbutton-icon, -#zotero-toolbar-save-button[cui-areatype="toolbar"]:hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon { +toolbar[id="nav-bar"] #zotero-toolbar-buttons > #zotero-toolbar-save-button:hover:not(:active) > .toolbarbutton-menubutton-button > .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-buttons > #zotero-toolbar-save-button:hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon { background: inherit; } -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button:hover:not(:active) > .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-buttons > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button:hover:not(:active) > .toolbarbutton-icon, /* This selector doesn't work, so the dropmarker doesn't get a hover effect. :hover doesn't seem to have an effect on either part of the dropmarker */ -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker:hover > .dropmarker-icon { +toolbar[id="nav-bar"] #zotero-toolbar-buttons > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker:hover > .dropmarker-icon { background: var(--toolbarbutton-hover-background) !important; } -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover:active:not([open]):not([disabled]) .toolbarbutton-menubutton-button .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover[open]:not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon { +toolbar[id="nav-bar"] #zotero-toolbar-buttons > #zotero-toolbar-save-button:hover:active:not([open]):not([disabled]) .toolbarbutton-menubutton-button .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-buttons > #zotero-toolbar-save-button:hover[open]:not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon { background: var(--toolbarbutton-active-background); border-color: var(--toolbarbutton-active-bordercolor); box-shadow: var(--toolbarbutton-active-boxshadow); transition-duration: 10ms; } + + +/* + * Alterations for non-nav-bar toolbars + */ +toolbar:not([id="nav-bar"]) #zotero-toolbar-main-button > .toolbarbutton-icon, +toolbar:not([id="nav-bar"]) #zotero-toolbar-main-button-single > .toolbarbutton-icon, +toolbar:not([id="nav-bar"]) #zotero-toolbar-save-button > .toolbarbutton-menubutton-button > .toolbarbutton-icon, +toolbar:not([id="nav-bar"]) #zotero-toolbar-save-button-single > .toolbarbutton-menubutton-button > .toolbarbutton-icon { + height: 16px; + width: 16px; + padding: 0; +} + +toolbar:not([id="nav-bar"]) #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker, +toolbar:not([id="nav-bar"]) #zotero-toolbar-save-button-single > .toolbarbutton-menubutton-dropmarker { + margin-left: -1px; +} + +toolbar:not([id="nav-bar"]) #zotero-toolbar-buttons separator { + display: none; +} + + +/* Alterations for overflow panel */ +#zotero-toolbar-main-button-single[overflowedItem=true] .toolbarbutton-icon, +#zotero-toolbar-buttons[overflowedItem=true] #zotero-toolbar-main-button .toolbarbutton-icon, +#zotero-toolbar-save-button-single[overflowedItem=true] .toolbarbutton-icon, +#zotero-toolbar-buttons[overflowedItem=true] #zotero-toolbar-save-button .toolbarbutton-icon { + width: 16px; +} + +#zotero-toolbar-buttons[overflowedItem=true] { + margin-left: 0 !important; + margin-bottom: 0 !important; + margin-right: 0 !important; + padding: 0 !important; +} + +#zotero-toolbar-buttons[overflowedItem=true] #zotero-toolbar-main-button { + max-width: 28px !important; + margin: 0 4px 0 0 !important; +} + +#zotero-toolbar-buttons[overflowedItem=true] #zotero-toolbar-save-button .toolbarbutton-menubutton-button { + margin-left: 8px; +} /* End toolbar buttons */ diff --git a/chrome/content/zotero-platform/win/overlay.css b/chrome/content/zotero-platform/win/overlay.css index 756291aee..ec9ae40d8 100644 --- a/chrome/content/zotero-platform/win/overlay.css +++ b/chrome/content/zotero-platform/win/overlay.css @@ -1,113 +1,190 @@ /* As of Fx36, the built-in styles don't properly handle a menu-button within combined buttons. + + On Windows and Linux, the padding and hover effect (border and shading) are applied directly to + the .toolbarbutton-icon (image) instead of the toolbarbutton, so proper sizing of the SVG depends + on the total width including border and padding. */ -#zotero-toolbar-main-button-single[cui-areatype="toolbar"] .toolbarbutton-icon { - width: 32px; -} -#zotero-toolbar-save-button-single[cui-areatype="toolbar"] .toolbarbutton-icon { - width: 30px; -} - -#zotero-toolbar-main-button[cui-areatype="toolbar"] .toolbarbutton-icon, -#zotero-toolbar-save-button[cui-areatype="toolbar"] .toolbarbutton-icon { - width: 28px; -} - -#zotero-toolbar-main-button[cui-areatype="toolbar"] { - margin-right: -1px !important; -} - -#zotero-toolbar-main-button[cui-areatype="toolbar"] .toolbarbutton-icon { - margin-left: 2px; - margin-right: -1px; +/* + * Nav bar + */ +toolbar[id="nav-bar"] #zotero-toolbar-main-button .toolbarbutton-icon { + width: 28px; /* 16 + 1 + 1 + 5 + 5 */ padding-left: 5px !important; padding-right: 5px !important; } -#zotero-toolbar-save-button[cui-areatype="toolbar"] .toolbarbutton-icon { +toolbar[id="nav-bar"] #zotero-toolbar-save-button .toolbarbutton-icon { + width: 28px; /* 16 + 6 + 5 + 1 */ padding-left: 6px !important; - padding-right: 6px !important; + padding-right: 5px !important; } -#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker .dropmarker-icon { - padding-left: 5px !important; - padding-right: 4px !important; +toolbar[id="nav-bar"] #zotero-toolbar-main-button-single .toolbarbutton-icon { + width: 32px; } -#zotero-toolbar-save-button[cui-areatype="toolbar"] .toolbarbutton-menubutton-button { - margin-left: -2px !important; +toolbar[id="nav-bar"] #zotero-toolbar-save-button-single .toolbarbutton-icon { + width: 31px; /* Compensate for border on only one side */ } -#zotero-toolbar-buttons[cui-areatype="toolbar"] > separator, -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker::before { +/* Fix size when dragged to nav bar in Customize mode */ +toolbar[id="nav-bar"] toolbarpaletteitem #zotero-toolbar-save-button .toolbarbutton-icon { + width: 29px; +} + +toolbar[id="nav-bar"] #zotero-toolbar-buttons #zotero-toolbar-main-button { + margin-right: -1px; +} + +toolbar[id="nav-bar"] #zotero-toolbar-buttons #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker .dropmarker-icon { + padding-left: 4px; + padding-right: 4px; +} + +toolbar[id="nav-bar"] #zotero-toolbar-buttons > separator { + margin-top: 11px; + margin-bottom: 11px; + -moz-margin-end: -3px; +} + +toolbar[id="nav-bar"] #zotero-toolbar-buttons > separator, +toolbar[id="nav-bar"] #zotero-toolbar-buttons > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker::before { width: 1px; - -moz-margin-end: -1px; background-image: var(--toolbarbutton-combined-backgroundimage); } -#zotero-toolbar-buttons[cui-areatype="toolbar"] > separator { - margin-top: 11px; - margin-bottom: 11px; +toolbar[id="nav-bar"] #zotero-toolbar-buttons > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker::before { + -moz-margin-end: -1px; } - -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > separator, -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button:not([disabled]) > .toolbarbutton-menubutton-dropmarker::before { - display: none; +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > separator, +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-save-button:not([disabled]) > .toolbarbutton-menubutton-dropmarker::before { + background-image: none; } -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-main-button .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button:not([disabled]) .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button:not([disabled]) .dropmarker-icon { +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-main-button .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-save-button:not([disabled]) .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-save-button:not([disabled]) .dropmarker-icon { border-color: var(--toolbarbutton-hover-bordercolor) !important; } -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-main-button:not(:active) .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover:not([disabled]) > #zotero-toolbar-save-button:not(:active) .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover:not([disabled]) > #zotero-toolbar-save-button:not(:active) .dropmarker-icon { +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-main-button:not(:active) .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover:not([disabled]) > #zotero-toolbar-save-button:not(:active) .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover:not([disabled]) > #zotero-toolbar-save-button:not(:active) .dropmarker-icon { background: var(--toolbarbutton-hover-background); } -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button .dropmarker-icon { +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-save-button .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-save-button .dropmarker-icon { box-shadow: none; } +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-main-button .toolbarbutton-icon { + border-top-right-radius: 0px !important; + border-bottom-right-radius: 0px !important; +} + +toolbar[id="nav-bar"] #zotero-toolbar-buttons:hover > #zotero-toolbar-save-button .toolbarbutton-icon { + border-top-left-radius: 0px !important; + border-bottom-left-radius: 0px !important; +} + /* There are two hover effects: when the toolbaritem is hovered over, and when the button is hovered over. This applies the latter (and may not be right on different versions of Windows). */ -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-main-button:hover:not(:active):not([disabled]) > .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-main-button:hover:not(:active):not([disabled]) > .toolbarbutton-icon, /* The dropmarker doesn't honor :hover, so instead of showing the hover effect for each segment individually, do the menu-button parts together, which at least looks like a choice. */ -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover .toolbarbutton-menubutton-button .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover:not(:active):not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon { +toolbar[id="nav-bar"] #zotero-toolbar-save-button:hover .toolbarbutton-menubutton-button .toolbarbutton-icon, +toolbar[id="nav-bar"] > #zotero-toolbar-save-button:hover:not(:active):not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon { background-color: hsla(210,48%,96%,.75) !important; } -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-main-button:hover > .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover:not([disabled]) .toolbarbutton-menubutton-button .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover:not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon { +toolbar[id="nav-bar"] #zotero-toolbar-main-button:hover > .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-save-button:hover:not([disabled]) .toolbarbutton-menubutton-button .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-save-button:hover:not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon { border-color: hsla(210,54%,20%,.3) hsla(210,54%,20%,.35) hsla(210,54%,20%,.4) !important; box-shadow: 0 0 1px hsla(210,54%,20%,.03), 0 0 2px hsla(210,54%,20%,.1) !important; } -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover:active:not([open]):not([disabled]) .toolbarbutton-menubutton-button .toolbarbutton-icon, -#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover[open]:not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon { - background: var(--toolbarbutton-active-background); - border-color: var(--toolbarbutton-active-bordercolor); - box-shadow: var(--toolbarbutton-active-boxshadow); +toolbar[id="nav-bar"] #zotero-toolbar-save-button:hover:active:not([open]):not([disabled]) .toolbarbutton-menubutton-button .toolbarbutton-icon, +toolbar[id="nav-bar"] #zotero-toolbar-save-button:hover[open]:not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon { + background: var(--toolbarbutton-active-background) !important; + border-color: var(--toolbarbutton-active-bordercolor) !important; + box-shadow: var(--toolbarbutton-active-boxshadow) !important; transition-duration: 10ms; } -#zotero-toolbar-save-button[cui-areatype="toolbar"] > menupopup { - margin-top: -5px; +#zotero-toolbar-save-button[cui-areatype="toolbar"] > menupopup, +#zotero-toolbar-save-button-single[cui-areatype="toolbar"] > menupopup { + margin-top: -7px; } + + +/* + * Alterations for non-nav-bar toolbars + */ +toolbar:not([id="nav-bar"]) #zotero-toolbar-main-button > .toolbarbutton-icon, +toolbar:not([id="nav-bar"]) #zotero-toolbar-main-button-single > .toolbarbutton-icon, +toolbar:not([id="nav-bar"]) #zotero-toolbar-save-button > .toolbarbutton-menubutton-button > .toolbarbutton-icon, +toolbar:not([id="nav-bar"]) #zotero-toolbar-save-button-single > .toolbarbutton-menubutton-button > .toolbarbutton-icon { + height: 16px; + width: 16px; + padding: 0; +} + +toolbar:not([id="nav-bar"]) #zotero-toolbar-main-button-single, +toolbar:not([id="nav-bar"]) #zotero-toolbar-save-button-single > .toolbarbutton-menubutton-button, +toolbar:not([id="nav-bar"]) #zotero-toolbar-save-button > .toolbarbutton-menubutton-button { + width: 24px; +} + +toolbar:not([id="nav-bar"]) #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker, +toolbar:not([id="nav-bar"]) #zotero-toolbar-save-button-single > .toolbarbutton-menubutton-dropmarker { + padding-left: 2px; + padding-right: 3px; +} + +toolbar:not([id="nav-bar"]) #zotero-toolbar-buttons separator { + display: none; +} + + +/* + * Alterations for overflow panel + */ +#zotero-toolbar-main-button-single[overflowedItem=true] .toolbarbutton-icon, +#zotero-toolbar-buttons[overflowedItem=true] #zotero-toolbar-main-button .toolbarbutton-icon, +#zotero-toolbar-save-button-single[overflowedItem=true] .toolbarbutton-icon, +#zotero-toolbar-buttons[overflowedItem=true] #zotero-toolbar-save-button .toolbarbutton-icon { + height: 16px; +} + +#zotero-toolbar-buttons[overflowedItem=true] { + margin: 6px 0 0 0 !important; +} + +#zotero-toolbar-buttons[overflowedItem=true] #zotero-toolbar-main-button { + max-width: 18px; +} + +#zotero-toolbar-buttons[overflowedItem=true] #zotero-toolbar-save-button toolbarbutton { + margin-left: 0 !important; +} + +#zotero-toolbar-buttons[overflowedItem=true] #zotero-toolbar-save-button .toolbarbutton-icon { + margin-left: 8px; + padding-right: 0 !important; +} + /* End toolbar buttons */ + @media (min-resolution: 1.5dppx) { #zotero-toolbar .toolbarbutton-icon { width: 16px; diff --git a/chrome/content/zotero/bibliography.js b/chrome/content/zotero/bibliography.js index aaf7713eb..ff45ac177 100644 --- a/chrome/content/zotero/bibliography.js +++ b/chrome/content/zotero/bibliography.js @@ -33,8 +33,11 @@ // Used by rtfScan.xul, integrationDocPrefs.xul, and bibliography.xul var Zotero_File_Interface_Bibliography = new function() { - var _io, _saveStyle; - var lastSelectedLocale; // Only changes when explicitly selected + var _io; + + // Only changes when explicitly selected + var lastSelectedStyle, + lastSelectedLocale; /* * Initialize some variables and prepare event listeners for when chrome is done @@ -60,7 +63,6 @@ var Zotero_File_Interface_Bibliography = new function() { // if no style is requested, get the last style used if(!_io.style) { _io.style = Zotero.Prefs.get("export.lastStyle"); - _saveStyle = true; } // add styles to list @@ -175,8 +177,8 @@ var Zotero_File_Interface_Bibliography = new function() { */ this.styleChanged = function () { var selectedItem = document.getElementById("style-listbox").selectedItem; - var selectedStyle = selectedItem.getAttribute('value'); - var selectedStyleObj = Zotero.Styles.get(selectedStyle); + lastSelectedStyle = selectedItem.getAttribute('value'); + var selectedStyleObj = Zotero.Styles.get(lastSelectedStyle); updateLocaleMenu(selectedStyleObj); @@ -210,7 +212,7 @@ var Zotero_File_Interface_Bibliography = new function() { // Change label to "Citation" or "Note" depending on style class if(document.getElementById("citations")) { let label = ""; - if(Zotero.Styles.get(selectedStyle).class == "note") { + if(Zotero.Styles.get(lastSelectedStyle).class == "note") { label = Zotero.getString('citation.notes'); } else { label = Zotero.getString('citation.citations'); @@ -235,7 +237,10 @@ var Zotero_File_Interface_Bibliography = new function() { this.acceptSelection = function () { // collect code _io.style = document.getElementById("style-listbox").value; - _io.locale = document.getElementById("locale-menu").value; + + let localeMenu = document.getElementById("locale-menu"); + _io.locale = localeMenu.disabled ? undefined : localeMenu.value; + if(document.getElementById("output-method-radio")) { // collect settings _io.mode = document.getElementById("output-mode-radio").selectedItem.id; @@ -249,7 +254,7 @@ var Zotero_File_Interface_Bibliography = new function() { if(document.getElementById("displayAs")) { var automaticJournalAbbreviationsEl = document.getElementById("automaticJournalAbbreviations-checkbox"); _io.automaticJournalAbbreviations = automaticJournalAbbreviationsEl.checked; - if(!automaticJournalAbbreviationsEl.hidden && _saveStyle) { + if(!automaticJournalAbbreviationsEl.hidden && lastSelectedStyle) { Zotero.Prefs.set("cite.automaticJournalAbbreviations", _io.automaticJournalAbbreviations); } _io.useEndnotes = document.getElementById("displayAs").selectedIndex; @@ -257,13 +262,13 @@ var Zotero_File_Interface_Bibliography = new function() { _io.storeReferences = document.getElementById("storeReferences").checked; } - // save style (this happens only for "Export Bibliography," or Word - // integration when no bibliography style was previously selected) - if(_saveStyle) { + // remember style and locale if user selected these explicitly + if(lastSelectedStyle) { Zotero.Prefs.set("export.lastStyle", _io.style); } - // save locale - Zotero.Prefs.set("export.lastLocale", lastSelectedLocale); + if (lastSelectedLocale) { + Zotero.Prefs.set("export.lastLocale", lastSelectedLocale); + } }; } diff --git a/chrome/content/zotero/bindings/guidancepanel.xml b/chrome/content/zotero/bindings/guidancepanel.xml index 5a925e750..82e9bbdf5 100644 --- a/chrome/content/zotero/bindings/guidancepanel.xml +++ b/chrome/content/zotero/bindings/guidancepanel.xml @@ -34,6 +34,8 @@ + + + + + + + + %globalDTD; + %textcontextDTD; + %standaloneDTD; + %brandDTD; + %zoteroDTD; +]> + + +