Toolbar redesign

This commit is contained in:
windingwind 2023-12-15 17:51:39 +08:00 committed by Dan Stillman
parent bd067df4f6
commit df0c2e2fd2
51 changed files with 555 additions and 608 deletions

View file

@ -7,117 +7,8 @@
margin-inline-start: 7px;
}
#zotero-tb-sync-stop .toolbarbutton-icon,
#zotero-tb-sync-error .toolbarbutton-icon {
width: 16px;
}
.zotero-tb-button > .toolbarbutton-icon {
max-width: 31px;
}
.zotero-tb-button,
.zotero-tb-button:first-child,
.zotero-tb-button:last-child {
margin-inline-start: 0 !important;
margin-inline-end: 3px !important;
padding-right: 10px !important;
background: url("chrome://zotero/skin/mac/menubutton-end.png") right center/auto 24px no-repeat;
}
.zotero-tb-button[type=menu] {
padding-inline-end: 8px !important;
}
.zotero-tb-button > .toolbarbutton-icon {
background: url("chrome://zotero/skin/mac/menubutton-start.png") left center/auto 24px no-repeat;
padding: 4px 4px 4px 11px;
}
/* For menu buttons, decrease left padding by 1px */
.zotero-tb-button[type=menu] > .toolbarbutton-icon {
padding-left: 9px;
max-width: 29px;
}
/* A decent hack: reverse the effective order of the dropmarker and icon in RTL
mode so that the above CSS, which places the menubutton-start.png background
on the toolbarbutton-icon, will make sense. (Otherwise the dropmarker appears
outside the button.) Then just flip the entire thing horizontally! We want to
do that anyway so that the Locate button will point to the left and Sync will
rotate counter-clockwise.
The other way to do this would be to set direction: ltr on buttons in the
RTL toolbar, but that breaks popup positioning. */
#zotero-pane[dir=rtl] .zotero-tb-button > .toolbarbutton-menu-dropmarker {
-moz-box-ordinal-group: 0;
}
#zotero-pane[dir=rtl] .zotero-tb-button > .toolbarbutton-icon {
-moz-box-ordinal-group: 1;
}
#zotero-pane[dir=rtl] .zotero-tb-button,
#zotero-pane[dir=rtl] .zotero-tb-button:first-child,
#zotero-pane[dir=rtl] .zotero-tb-button:last-child {
transform: scaleX(-1);
}
#zotero-collections-toolbar {
padding-inline-start: 0;
}
.zotero-tb-button:-moz-window-inactive {
opacity: 0.5;
}
.zotero-tb-button:-moz-window-inactive > .toolbarbutton-icon {
background: url("chrome://zotero/skin/mac/menubutton-start-inactive-window.png") left center/auto 24px no-repeat;
}
/* Use a darker background when inactive so the button itself doesn't get too dark at 50% */
.zotero-tb-button:-moz-window-inactive,
.zotero-tb-button:-moz-window-inactive:first-child,
.zotero-tb-button:-moz-window-inactive:last-child {
background: url("chrome://zotero/skin/mac/menubutton-end-inactive-window.png") right center/auto 24px no-repeat;
}
.zotero-tb-button[open="true"],
.zotero-tb-button:not([disabled="true"]):hover:active {
background: url("chrome://zotero/skin/mac/menubutton-end-pressed.png") right center/auto 24px no-repeat;
}
.zotero-tb-button > menupopup {
-moz-margin-start: 2px;
margin-top: -4px;
}
#zotero-tb-sync > .toolbarbutton-icon {
-moz-padding-start: 8px;
padding-top: 1px;
}
#zotero-tb-sync-error[error=true]
{
margin-bottom: 2px;
}
.zotero-tb-button[open="true"] > .toolbarbutton-icon,
.zotero-tb-button:not([disabled="true"]):hover:active > .toolbarbutton-icon {
background: url("chrome://zotero/skin/mac/menubutton-start-pressed.png") left center/auto 24px no-repeat;
}
.zotero-tb-button > .toolbarbutton-text {
display: none;
}
#zotero-tb-sync > .toolbarbutton-icon {
-moz-binding: none !important;
padding: 2px 0px 2px 8px !important;
}
#zotero-tb-sync {
margin: 0;
}
.zotero-item-pane-content .groupbox-body {
@ -245,26 +136,8 @@ treechildren::-moz-tree-image {
padding-bottom: 1px;
}
#zotero-tb-advanced-search
{
list-style-image: url('chrome://zotero/skin/mac/toolbar-advanced-search.png');
}
#zotero-tb-note-add
{
list-style-image: url('chrome://zotero/skin/mac/toolbar-note-add.png');
}
/* BEGIN 2X BLOCK -- DO NOT EDIT MANUALLY -- USE 2XIZE */
@media (min-resolution: 1.25dppx) {
.zotero-tb-button,.zotero-tb-button:first-child,.zotero-tb-button:last-child { background: url("chrome://zotero/skin/mac/menubutton-end@2x.png") right center/auto 24px no-repeat; }
.zotero-tb-button > .toolbarbutton-icon { background: url("chrome://zotero/skin/mac/menubutton-start@2x.png") left center/auto 24px no-repeat; }
.zotero-tb-button:-moz-window-inactive > .toolbarbutton-icon { background: url("chrome://zotero/skin/mac/menubutton-start-inactive-window@2x.png") left center/auto 24px no-repeat; }
.zotero-tb-button:-moz-window-inactive,.zotero-tb-button:-moz-window-inactive:first-child,.zotero-tb-button:-moz-window-inactive:last-child { background: url("chrome://zotero/skin/mac/menubutton-end-inactive-window@2x.png") right center/auto 24px no-repeat; }
.zotero-tb-button[open="true"],.zotero-tb-button:not([disabled="true"]):hover:active { background: url("chrome://zotero/skin/mac/menubutton-end-pressed@2x.png") right center/auto 24px no-repeat; }
.zotero-tb-button[open="true"] > .toolbarbutton-icon,.zotero-tb-button:not([disabled="true"]):hover:active > .toolbarbutton-icon { background: url("chrome://zotero/skin/mac/menubutton-start-pressed@2x.png") left center/auto 24px no-repeat; }
#zotero-collections-splitter[state=collapsed] > grippy, #zotero-items-splitter[state=collapsed] > grippy { background: url(chrome://zotero/skin/mac/vgrippy@2x.png) center/auto 8px no-repeat; }
#zotero-tags-splitter > grippy { background: url(chrome://zotero/skin/mac/hgrippy@2x.png) center/auto 8px no-repeat; }
#zotero-tb-advanced-search { list-style-image: url('chrome://zotero/skin/mac/toolbar-advanced-search@2x.png'); }
#zotero-tb-note-add { list-style-image: url('chrome://zotero/skin/mac/toolbar-note-add@2x.png'); }
}

View file

@ -1,26 +1,3 @@
@media (min-resolution: 1.25dppx) {
#zotero-pane-stack .toolbarbutton-icon {
width: 16px;
}
#zotero-tb-sync > .toolbarbutton-icon {
width: 20px;
}
}
.zotero-tb-button[type="menu"] > .toolbarbutton-menu-dropmarker {
-moz-default-appearance: toolbarbutton-dropdown;
margin-left: 4px;
}
.zotero-tb-button:not([type=menu]) {
margin-right: 4px;
}
#zotero-pane[dir=rtl] .zotero-tb-button > .toolbarbutton-icon {
transform: scaleX(-1);
}
/* Fixes tabs missing styling on (GTK 3.20) Ubuntu 16.10. See https://bugzilla.mozilla.org/show_bug.cgi?id=1306425 */
tabpanels {
-moz-appearance: none;
@ -53,6 +30,3 @@ tab {
background-color: #ececec;
border-top: 1px solid hsla(0, 0%, 0%, 0.2);
}
.zotero-tb-button:focus {
border: 1px dotted #999;
}

View file

@ -7,46 +7,6 @@
-moz-appearance: none;
}
#zotero-pane .zotero-toolbar {
-moz-appearance: none !important;
margin-top: -3px;
border-bottom: 1px solid var(--theme-border-color);
}
@media (min-resolution: 1.25dppx) {
#zotero-pane-stack .toolbarbutton-icon {
width: 16px;
}
#zotero-tb-sync > .toolbarbutton-icon {
width: 20px;
}
}
.zotero-tb-button[type="menu"] > .toolbarbutton-menu-dropmarker {
margin-left: 4px;
}
#zotero-tb-sync-error {
margin-right: 4px;
padding-top: 4px;
}
#zotero-tb-sync {
margin-right: 1px;
padding-top: 4px;
}
.zotero-toolbar {
-moz-appearance: toolbox !important;
padding-left: 2px;
}
#zotero-pane[dir=rtl] .zotero-tb-button > .toolbarbutton-icon {
transform: scaleX(-1);
}
#zotero-collections-splitter:not([state=collapsed]),
#zotero-items-splitter:not([state=collapsed]),
#zotero-tags-splitter:not([state=collapsed]),

View file

@ -54,8 +54,8 @@ Services.scriptloader.loadSubScript('chrome://zotero/content/elements/attachment
Services.scriptloader.loadSubScript('chrome://zotero/content/elements/attachmentRow.js', this);
Services.scriptloader.loadSubScript('chrome://zotero/content/elements/annotationRow.js', this);
// Fix missing property bug that breaks arrow key navigation between <tab>s
{
// Fix missing property bug that breaks arrow key navigation between <tab>s
let MozTabPrototype = customElements.get('tab').prototype;
if (!MozTabPrototype.hasOwnProperty('container')) {
Object.defineProperty(MozTabPrototype, 'container', {
@ -70,25 +70,62 @@ Services.scriptloader.loadSubScript('chrome://zotero/content/elements/annotation
});
}
// Add MacOS menupopup fade animation to menupopups
if (Zotero.isMac) {
// Monkey-patch the toolbarbutton CE so it shows a native menu popup
let MozToolbarbuttonPrototype = customElements.get('toolbarbutton').prototype;
if (MozToolbarbuttonPrototype) {
let originalRender = MozToolbarbuttonPrototype.render;
MozToolbarbuttonPrototype.render = function () {
originalRender.apply(this);
if (!this._zoteroMouseDownListenerAdded) {
this.addEventListener('mousedown', (event) => {
if (!event.defaultPrevented
&& !this.disabled
&& this.getAttribute('nonnativepopup') != 'true'
&& Zotero.Utilities.Internal.showNativeElementPopup(this)) {
event.preventDefault();
}
});
this._zoteroMouseDownListenerAdded = true;
let MozMenuPopupPrototype = customElements.get("menupopup").prototype;
// Initialize the menupopup when it's first opened
let originalEnsureInitialized = MozMenuPopupPrototype.ensureInitialized;
MozMenuPopupPrototype.ensureInitialized = function () {
if (!this._zoteroInitialized) {
this._zoteroInitialized = true;
/**
* Add fade animation to the popup
* animate="false" will disable the animation
* animate="false-once" will disable the animation once, which we use for the
* command event, so that the popup doesn't flicker when the user clicks
* animate="open" when the menu is open
* animate="cancel" when is menu is hiding
*/
if (this.getAttribute("animate") !== "false") {
this.setAttribute("animate", "open");
}
};
}
// Update animate attribute when the popup is shown
this.addEventListener("popupshowing", () => {
if (this.getAttribute("animate") === "false") {
return;
}
this.setAttribute("animate", "open");
});
// Update animate attribute when the popup is hiding and trigger the fade out animation
this.addEventListener("popuphiding", (e) => {
if (!this.getAttribute("animate") || ["false", "false-once"].includes(this.getAttribute("animate"))) {
return;
}
e.preventDefault();
e.stopPropagation();
this.setAttribute("animate", "cancel");
// Make the timeout slightly longer than the animation duration (180ms) in _menupopup.scss
setTimeout(() => {
this.removeAttribute("animate");
this.hidePopup();
}, 200);
});
// This event is triggered after clicking the menu and before popuphiding
// where we control whether the fade out animation should run
this.addEventListener("command", () => {
if (this.getAttribute("animate") === "false") {
return;
}
// Disable the fading animation when the popup is closed by clicking
this.setAttribute("animate", "false-once");
});
}
originalEnsureInitialized.apply(this);
};
}
}

View file

@ -77,7 +77,6 @@
let searchBox = document.createXULElement("search-textbox");
searchBox.id = "zotero-tb-search-textbox";
searchBox.inputField.style = "padding-left:10px";
this.searchTextbox = searchBox;
wrapper.appendChild(dropmarkerHost);

View file

@ -167,7 +167,7 @@ var ZoteroPane = new function()
key = 'Shift' + key;
}
// ArrowUp or ArrowDown act the same way as as
// shift-tab/tab unles it is on a menu, in which case
// shift-tab/tab unless it is on a menu, in which case
// it'll open the menu popup
let isMenu = event.target.getAttribute('type') === 'menu'
|| event.originalTarget?.getAttribute('type') === 'menu';
@ -306,12 +306,6 @@ var ZoteroPane = new function()
});
itemTreeToolbar.addEventListener("keydown", (event) => {
let openMenu = (node) => {
const popup = node.querySelector("menupopup");
if (popup !== null && !node.disabled) {
popup.openPopup();
}
};
let actionsMap = {
'zotero-tb-add': {
ArrowRight: () => document.getElementById("zotero-tb-lookup"),
@ -325,10 +319,10 @@ var ZoteroPane = new function()
return null;
},
' ': () => {
openMenu(document.getElementById('zotero-tb-add'));
document.getElementById('zotero-tb-add').open = true;
},
Enter: () => {
openMenu(document.getElementById('zotero-tb-add'));
document.getElementById('zotero-tb-add').open = true;
}
},
'zotero-tb-lookup': {

View file

@ -758,6 +758,7 @@
<div xmlns="http://www.w3.org/1999/xhtml" id="tab-bar-container" style="-moz-box-flex: 1;"/>
<hbox id="zotero-tabs-toolbar" align="center">
<toolbarbutton id="zotero-tb-opened-tabs" class="zotero-tb-button" tabindex="-1" data-l10n-id="zotero-toolbar-opened-tabs-menu" type="panel" />
<div xmlns="http://www.w3.org/1999/xhtml" class="zotero-tb-separator"></div>
<hbox id="zotero-tb-sync-progress-box" align="center" pack="end">
<toolbarbutton id="zotero-tb-sync-stop"
tooltiptext="&zotero.sync.stop;"
@ -955,8 +956,10 @@
<spacer flex="1"></spacer>
<html:div style="display: flex;flex-direction: row;">
<toolbarbutton id="zotero-tb-collections-search" tabindex="-1" class="zotero-tb-button" tooltiptext="&zotero.toolbar.newCollection.label;"/>
<!-- For unknown reason, the data-l10n-id.placeholder doesn't work here. Hard code it for now -->
<search-textbox
id="zotero-collections-search" class="hidden" disabled="true"
placeholder="Filter Collections" data-l10n-id="zotero-collections-search"
oncommand="ZoteroPane.handleCollectionSearchInput()"/>
</html:div>
</hbox>
@ -1256,21 +1259,20 @@
})();">
<menuitem id="num-selected" disabled="true"/>
<menuitem id="deselect-all" label="&zotero.tagSelector.clearAll;"
oncommand="ZoteroPane.tagSelector.deselectAll(); event.stopPropagation();"/>
oncommand="ZoteroPane.tagSelector.deselectAll();;"/>
<menuseparator/>
<menuitem id="show-automatic" label="&zotero.tagSelector.showAutomatic;" type="checkbox"
oncommand="ZoteroPane.tagSelector.toggleShowAutomatic(); event.stopPropagation();"/>
oncommand="ZoteroPane.tagSelector.toggleShowAutomatic();"/>
<menuitem
id="display-all-tags"
label="&zotero.tagSelector.displayAllInLibrary;"
type="checkbox"
oncommand="ZoteroPane.tagSelector.toggleDisplayAllTags(); event.stopPropagation();"
oncommand="ZoteroPane.tagSelector.toggleDisplayAllTags();"
/>
<menuseparator/>
<menuitem id="delete-automatic-tags" label="&zotero.tagSelector.deleteAutomaticInLibrary;" type="checkbox"
oncommand="ZoteroPane.tagSelector.deleteAutomatic();
this.setAttribute('checked', false);
event.stopPropagation();"/>
this.setAttribute('checked', false);"/>
</menupopup>
</popupset>
</hbox>

View file

@ -2,6 +2,8 @@ zotero-toolbar-new-attachment =
.tooltiptext = Add File
zotero-toolbar-opened-tabs-menu =
.tooltiptext = List all tabs
zotero-collections-search =
.placeholder = Filter Collections
item-menu-viewAttachment =
.label = Open {

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4H2.25C1.55964 4 1 4.55964 1 5.25V6.75V8V16.75C1 17.4404 1.55964 18 2.25 18H11.5666C12.401 19.2083 13.7955 20 15.375 20C17.9293 20 20 17.9293 20 15.375C20 14.2895 19.6261 13.2914 19 12.5024V5.25C19 4.55964 18.4404 4 17.75 4H11L10.3455 2.69098C10.1338 2.2675 9.70092 2 9.22746 2H5.27254C4.79908 2 4.36625 2.2675 4.15451 2.69098L3.5 4ZM10.75 15.375C10.75 15.8538 10.8228 16.3156 10.9578 16.75H2.25V8H17.75V11.4056C17.0558 10.9893 16.2433 10.75 15.375 10.75C12.8207 10.75 10.75 12.8207 10.75 15.375ZM17.75 6.75V5.25H11C10.5265 5.25 10.0937 4.9825 9.88197 4.55902L9.22746 3.25H5.27254L4.61803 4.55902C4.40629 4.9825 3.97346 5.25 3.5 5.25H2.25V6.75H17.75ZM15.375 18.75C17.239 18.75 18.75 17.239 18.75 15.375C18.75 13.511 17.239 12 15.375 12C13.511 12 12 13.511 12 15.375C12 17.239 13.511 18.75 15.375 18.75ZM14.75 13V14.75H13V16H14.75V17.75H16V16H17.75V14.75H16V13H14.75Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.625 1H3V1.625V4H1.25H0V5.25V7.75V9H1.25H3V18.375V19H3.625H12.5024C13.2914 19.6261 14.2895 20 15.375 20C17.9293 20 20 17.9293 20 15.375C20 13.7955 19.2083 12.401 18 11.5666V6.625V6.36612L17.8169 6.18306L12.8169 1.18306L12.6339 1H12.375H3.625ZM13 17.75V17.7729C13.6098 18.377 14.4488 18.75 15.375 18.75C17.239 18.75 18.75 17.239 18.75 15.375C18.75 13.511 17.239 12 15.375 12C13.511 12 12 13.511 12 15.375C12 16.3012 12.373 17.1402 12.9771 17.75H13ZM4.25 17.75H11.4056C10.9893 17.0558 10.75 16.2433 10.75 15.375C10.75 12.8207 12.8207 10.75 15.375 10.75C15.8538 10.75 16.3156 10.8228 16.75 10.9578V7.25H12.375H11.75V6.625V2.25H4.25V4H8.75H10V5.25V7.75V9H8.75H4.25V17.75ZM15.8661 6L13 3.13388V6H15.8661ZM8.75 5.25V7.75H1.25V5.25H8.75ZM14.75 13V14.75H13V16H14.75V17.75H16V16H17.75V14.75H16V13H14.75Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 972 B

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 1H3.625H12.375H12.6339L12.8169 1.18306L17.8169 6.18306L18 6.36612V6.625V11.5666C19.2083 12.401 20 13.7955 20 15.375C20 17.9293 17.9293 20 15.375 20C14.2895 20 13.2914 19.6261 12.5024 19H3.625H3V18.375V1.625V1ZM16.75 7.25V10.9578C16.3156 10.8228 15.8538 10.75 15.375 10.75C12.8207 10.75 10.75 12.8207 10.75 15.375C10.75 16.2433 10.9893 17.0558 11.4056 17.75H4.25V2.25H11.75V6.625V7.25H12.375H16.75ZM13 17.75V17.7729C13.6098 18.377 14.4488 18.75 15.375 18.75C17.239 18.75 18.75 17.239 18.75 15.375C18.75 13.511 17.239 12 15.375 12C13.511 12 12 13.511 12 15.375C12 16.3012 12.373 17.1402 12.9771 17.75H13ZM13 3.13388L15.8661 6H13V3.13388ZM14.75 13V14.75H13V16H14.75V17.75H16V16H17.75V14.75H16V13H14.75Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 878 B

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.1161 6L18 6.88389L10 14.8839L2 6.88388L2.88388 6L10 13.1161L17.1161 6Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 210 B

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 17.75C14.2802 17.75 17.75 14.2802 17.75 10C17.75 5.71979 14.2802 2.25 10 2.25C5.71979 2.25 2.25 5.71979 2.25 10C2.25 14.2802 5.71979 17.75 10 17.75ZM10 19C14.9706 19 19 14.9706 19 10C19 5.02944 14.9706 1 10 1C5.02944 1 1 5.02944 1 10C1 14.9706 5.02944 19 10 19ZM9.5 12L9 5H11L10.5 12H9.5ZM10 15C10.5523 15 11 14.5523 11 14C11 13.4477 10.5523 13 10 13C9.44771 13 9 13.4477 9 14C9 14.5523 9.44771 15 10 15Z" fill="#DB2C3A"/>
</svg>

After

Width:  |  Height:  |  Size: 579 B

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.625 1H3V1.625V18.375V19H3.625H14.9698L13.7198 17.75H4.25V2.25H11.75V6.625V7.25H12.375H16.75V9.95176L18 11.2018V6.625V6.36612L17.8169 6.18306L12.8169 1.18306L12.6339 1H12.375H3.625ZM15.8661 6L13 3.13388V6H15.8661ZM17.4911 15.125H10V13.875H17.4911L15 11.3839L15.8839 10.5L19.8838 14.5L15.8839 18.5L15 17.6161L17.4911 15.125Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 501 B

View file

@ -0,0 +1,10 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1067_43177)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.9999 0L9.4999 1.5L7.99991 2V2.5L9.4999 3L9.9999 4.5H10.4999L10.9999 3L12.4999 2.5V2L10.9999 1.5L10.4999 0H9.9999ZM17.4999 7.5L16.9999 9L15.4999 9.5V10L16.9999 10.5L17.4999 12H17.9999L18.4999 10.5L19.9999 10V9.5L18.4999 9L17.9999 7.5H17.4999ZM16.9999 1.5L17.4999 0H17.9999L18.4999 1.5L19.9999 2V2.5L18.4999 3L17.9999 4.5H17.4999L16.9999 3L15.4999 2.5V2L16.9999 1.5ZM13.9999 4.76777L11.3838 7.38388L12.616 8.61612L15.2321 6L13.9999 4.76777ZM1.76767 17L4.38379 14.3839L5.61602 15.6161L2.99991 18.2322L1.76767 17ZM0.883789 16.1161L13.116 3.88388C13.6042 3.39573 14.3956 3.39573 14.8838 3.88388L16.116 5.11612C16.6042 5.60427 16.6042 6.39573 16.116 6.88388L3.88379 19.1161C3.39563 19.6043 2.60418 19.6043 2.11602 19.1161L0.883789 17.8839C0.395634 17.3957 0.395634 16.6043 0.883789 16.1161Z" fill="context-fill"/>
</g>
<defs>
<clipPath id="clip0_1067_43177">
<rect width="20" height="20" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.75 7.5C12.75 10.3995 10.3995 12.75 7.5 12.75C4.60051 12.75 2.25 10.3995 2.25 7.5C2.25 4.60051 4.60051 2.25 7.5 2.25C10.3995 2.25 12.75 4.60051 12.75 7.5ZM11.6331 12.5169C10.5097 13.4435 9.06986 14 7.5 14C3.91015 14 1 11.0899 1 7.5C1 3.91015 3.91015 1 7.5 1C11.0899 1 14 3.91015 14 7.5C14 9.06984 13.4435 10.5097 12.517 11.6331L19 18.1161L18.1162 19L11.6331 12.5169Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 545 B

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.625 1H3V1.625V3.75V5V18.375V19H3.625H12.375H12.6339L12.8169 18.8169L17.8169 13.8169L18 13.6339V13.375V1.625V1H17.375H3.625ZM4.25 5V17.75H11.75V13.375V12.75H12.375H16.75V5H4.25ZM16.75 3.75V2.25H4.25V3.75H16.75ZM13 14H15.8661L13 16.8661V14Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 417 B

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.75 10C17.75 14.2802 14.2802 17.75 10 17.75C5.71979 17.75 2.25 14.2802 2.25 10C2.25 5.71979 5.71979 2.25 10 2.25C14.2802 2.25 17.75 5.71979 17.75 10ZM19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10ZM6.00003 6.88388L9.1161 9.99999L5.99998 13.1161L6.88386 14L9.99999 10.8839L13.1162 14L14 13.1162L10.8839 9.99999L14 6.88388L13.1162 6L9.99999 9.1161L6.88391 6L6.00003 6.88388Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 616 B

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.75 10C17.75 14.2802 14.2802 17.75 10 17.75C5.71979 17.75 2.25 14.2802 2.25 10C2.25 5.71979 5.71979 2.25 10 2.25C14.2802 2.25 17.75 5.71979 17.75 10ZM19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10ZM8.50005 14.3839L14.9999 7.88388L14.116 7L8.50005 12.6161L5.88379 10L4.99991 10.8839L8.50005 14.3839Z" fill="#39BF68"/>
</svg>

After

Width:  |  Height:  |  Size: 537 B

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.7498 4.43755C14.2954 2.93446 12.2569 2 10.0001 2C5.9205 2 2.55411 5.05369 2.06201 9H3.32368C3.80688 5.74629 6.61198 3.25 10.0001 3.25C12.1173 3.25 14.0069 4.22477 15.2444 5.75H12.0001V7L17.0001 7V2H15.7498V4.43755ZM10.0001 18C7.74312 18 5.70442 17.0654 4.24996 15.562V18H3.0002V13H8.0002V14.25H4.75554C5.99312 15.7752 7.88266 16.75 9.99987 16.75C13.388 16.75 16.1931 14.2537 16.6763 11H17.9382C17.4461 14.9463 14.0797 18 10.0001 18Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 612 B

View file

@ -194,14 +194,6 @@
height: 0;
}
.toolbar {
height: 32px !important; /* Hard-code this to fix toolbar icon compression on Linux */
min-height: 32px; /* Needed to prevent squashing by stretched tag selector */
margin: 0;
padding: 0;
min-width: 1px;
}
#zotero-pane toolbarseparator {
height:24px;
}
@ -214,109 +206,16 @@
margin-inline-end: 10px;
}
.zotero-tb-button {
-moz-user-focus: normal;
padding-left: 5px;
padding-right: 5px;
margin-right: 2px;
margin-left: 2px;
}
.zotero-tb-button:first-child {
margin-inline-start: 0 !important;
}
.zotero-tb-button:last-child {
margin-inline-end: 0 !important;
}
.zotero-tb-button[type="menu"] {
padding-inline-start: 3px;
padding-inline-end: 3px;
margin-inline-start: 4px;
margin-inline-end: 2px;
}
.zotero-tb-button[type="menu"] > .toolbarbutton-menu-dropmarker {
-moz-default-appearance: none;
background-image: url("chrome://zotero/skin/searchbar-dropmarker.png");
width: 7px;
height: 4px;
background-repeat: no-repeat;
background-size: 100%;
}
.zotero-tb-button[type="menu"] > .toolbarbutton-menu-dropmarker::part(icon) {
display: none;
}
.zotero-tb-button:hover:active {
mix-blend-mode: multiply;
}
.zotero-button-clear-image {
list-style-image: none
}
#zotero-tb-collection-add
{
list-style-image: url('chrome://zotero/skin/toolbar-collection-add.png');
}
#zotero-tb-library-add-menu
{
list-style-image: url('chrome://zotero/skin/library_add.png');
}
#zotero-collections-tree, #zotero-items-tree, #zotero-item-pane > groupbox
{
margin: 0;
padding: 0;
}
#zotero-collections-search {
max-width: 0;
transition: max-width 0.5s ease;
padding: 0;
margin: 0;
appearance: none;
visibility: hidden;
}
#zotero-collections-search.visible {
max-width: 180px;
appearance: auto;
visibility: visible;
/* Avoids flickering between pointer and text cursor during transition */
cursor: text;
/* Bring back default margins and padding */
padding: revert-layer;
margin: revert-layer;
}
/* Hide collection search on pane collapse, otherwise it still shows when focused */
#zotero-collections-pane[collapsed=true] #zotero-collections-search.visible {
visibility: hidden;
}
/* Hide the add button on pane collapse. Otherwise, it may show on top of 'New Item' */
#zotero-collections-pane[collapsed=true] #zotero-tb-collection-add {
visibility: hidden;
}
#zotero-tb-add
{
list-style-image: url('chrome://zotero/skin/toolbar-item-add.png');
}
#zotero-tb-lookup
{
list-style-image: url('chrome://zotero/skin/toolbar-lookup.png');
}
#zotero-lookup-textbox {
margin: 4px;
padding: 2px;
@ -328,48 +227,11 @@
height: 2em;
}
#zotero-tb-item-from-page
{
list-style-image: url('chrome://zotero/skin/toolbar-item-from-page.png');
}
#zotero-lookup-multiline-progress
{
height: 2em;
}
/*
#zotero-tb-link-page
{
list-style-image: url('chrome://zotero/skin/toolbar-link-add.png');
}
#zotero-tb-snapshot-page
{
list-style-image: url('chrome://zotero/skin/toolbar-snapshot-add.png');
}
*/
#zotero-tb-attachment-add
{
list-style-image: url('chrome://zotero/skin/attach.png');
}
#zotero-tb-note-add
{
list-style-image: url('chrome://zotero/skin/toolbar-note-add.png');
}
#zotero-tb-advanced-search
{
list-style-image: url('chrome://zotero/skin/toolbar-advanced-search.png');
}
#zotero-tb-sync-stop
{
list-style-image: url(chrome://zotero/skin/control_stop_blue.png);
margin-inline-end: 0;
}
#zotero-tb-sync-progress
{
min-width: 50px;
@ -404,19 +266,6 @@
margin-top: 1px;
}
/* Sync error icon */
#zotero-tb-sync-error {
list-style-image: url(chrome://zotero/skin/error.png);
}
#zotero-tb-sync-error[state=warning] {
list-style-image: url(chrome://zotero/skin/warning.png);
}
#zotero-tb-sync-error[state=upgrade] {
list-style-image: url(chrome://zotero/skin/bell_error.png);
}
/* Sync error panel */
#zotero-sync-error-panel, #zotero-sync-reminder-panel {
margin-inline-end: 0;
@ -446,26 +295,6 @@
-moz-box-pack: end;
}
#zotero-tb-sync {
list-style-image: url(chrome://zotero/skin/arrow_rotate_static.png);
margin-inline-start: -6px;
margin-inline-end: -2px;
padding-inline-end: 6px;
}
#zotero-tb-sync .toolbarbutton-icon {
max-width: 28px;
}
#zotero-tb-sync[status=animate] {
list-style-image: url(chrome://zotero/skin/arrow_rotate_animated.png);
}
#zotero-tb-sync-status, #zotero-tb-sync-last-sync
{
color: gray;
}
.zotero-toolbar
{
visibility: visible !important;
@ -622,22 +451,3 @@
.split-menu-button .split-menu-button-dropmarker {
margin-inline: 5px;
}
/* BEGIN 2X BLOCK -- DO NOT EDIT MANUALLY -- USE 2XIZE */
@media (min-resolution: 1.25dppx) {
.zotero-tb-button[type="menu"] > .toolbarbutton-menu-dropmarker { background-image: url("chrome://zotero/skin/searchbar-dropmarker@2x.png"); }
#zotero-tb-collection-add { list-style-image: url('chrome://zotero/skin/toolbar-collection-add@2x.png'); }
#zotero-tb-library-add-menu { list-style-image: url('chrome://zotero/skin/library_add@2x.png'); }
#zotero-tb-add { list-style-image: url('chrome://zotero/skin/toolbar-item-add@2x.png'); }
#zotero-tb-lookup { list-style-image: url('chrome://zotero/skin/toolbar-lookup@2x.png'); }
#zotero-tb-attachment-add { list-style-image: url('chrome://zotero/skin/attach@2x.png'); }
#zotero-tb-note-add { list-style-image: url('chrome://zotero/skin/toolbar-note-add@2x.png'); }
#zotero-tb-advanced-search { list-style-image: url('chrome://zotero/skin/toolbar-advanced-search@2x.png'); }
#zotero-tb-sync-stop { list-style-image: url(chrome://zotero/skin/control_stop_blue@2x.png); }
#zotero-tb-pq-recognize { list-style-image: url(chrome://zotero/skin/pdf-search@2x.png); }
#zotero-tb-sync-error { list-style-image: url(chrome://zotero/skin/error@2x.png); }
#zotero-tb-sync-error[state=warning] { list-style-image: url(chrome://zotero/skin/warning@2x.png); }
#zotero-tb-sync { list-style-image: url(chrome://zotero/skin/arrow_rotate_static@2x.png); }
#zotero-tb-sync[status=animate] { list-style-image: url(chrome://zotero/skin/arrow_rotate_animated@2x.png); }
}

View file

@ -45,9 +45,9 @@
@import "components/tagSelector";
@import "components/tags-splitter";
@import "components/textLink";
@import "components/toolbar";
@import "components/toolbarbutton";
@import "components/virtualized-table";
@import "components/expand-button";
// Elements
// --------------------------------------------------

View file

@ -6,6 +6,25 @@
font-family: system-ui, -apple-system, sans-serif;
font-size: 12px;
font-style: normal;
@media (-moz-platform: windows) {
--color-accent: var(--accent-blue);
}
@media not (-moz-platform: windows) {
--color-accent: SelectedItem;
}
--color-focus-search-color: color-mix(in srgb, var(--color-accent) 70%, transparent);
@media (-moz-platform: windows) {
@include light-dark(--color-focus-border, #000, #fff);
--width-focus-border: 2px;
}
@media (-moz-platform: macos) {
--color-focus-border: color-mix(in srgb, var(--color-accent) 70%, transparent);
--width-focus-border: 3px;
}
@media (-moz-platform: linux) {
--color-focus-border: var(--color-accent);
--width-focus-border: 2px;
}
}
#zotero-collections-pane, #zotero-item-pane {

View file

@ -1,39 +0,0 @@
.expand-button {
min-width: 0;
width: 40px;
height: 28px;
margin: 0;
padding: 4px;
border-radius: 5px;
background-color: transparent;
-moz-context-properties: fill, fill-opacity;
fill: var(--fill-secondary);
&:hover {
background-color: var(--fill-quinary);
}
&[open="true"] {
background-color: var(--fill-quarternary);
}
&:disabled {
background-color: transparent;
fill: var(--fill-tertiary);
.toolbarbutton-menu-dropmarker {
fill: var(--fill-tertiary);
}
}
.toolbarbutton-menu-dropmarker {
display: block;
visibility: visible;
@include svgicon("chevron-8", "universal", "8");
fill: var(--fill-secondary);
width: 8px;
height: 8px;
}
}

View file

@ -159,3 +159,7 @@
font-size: var(--zotero-font-size);
}
}
:is(panel)::part(content) {
--panel-background: var(--material-toolbar);
}

View file

@ -1,17 +1,50 @@
.search {
position: relative;
min-width: 40px;
height: 36px;
input {
background: var(--material-background);
border-radius: 5px;
border: var(--material-border-quinary);
color: var(--fill-primary);
flex: 1 0;
margin: 6px 4px;
min-width: 40px;
padding: 3px 7px;
&::placeholder {
color: var(--fill-tertiary);
opacity: 1.0;
}
&:focus {
outline: none;
border-color: var(--color-focus-search-color);
box-shadow: 0 0 0 calc(var(--width-focus-border) - 1px) var(--color-focus-search-color);
}
}
.search-cancel-button {
position: absolute;
right: 0px;
width: 14px;
height: 14px;
padding: 5px 8px 5px 5px;
margin: 6px 4px 6px 0px;
cursor: default;
background: url(resource://gre-resources/searchfield-cancel.svg) no-repeat center/contain;
background-size: unset;
}
}
.search input {
search-textbox {
appearance: none;
background: var(--material-background);
border-radius: 5px;
border: var(--material-border-quinary);
color: var(--fill-primary);
flex: 1 0;
margin: 6px 4px;
min-width: 40px;
padding: 3px 7px;
padding: 0px 6px 0px 0px;
&::placeholder {
color: var(--fill-tertiary);
@ -20,13 +53,16 @@
&:focus {
outline: none;
border-color: SelectedItem;
box-shadow: 0 0 0 2px SelectedItem;
border-color: transparent;
box-shadow: 0 0 0 var(--width-focus-border) var(--color-focus-search-color);
}
}
.search .search-cancel-button {
position: absolute;
right: 6px;
cursor: default;
}
:is(search-textbox)::part(search-sign),
:is(search-textbox)::part(search-icon) {
@include svgicon-menu("magnifier", "universal", "16");
color: var(--fill-secondary);
// right: 2px padding + 8px dropmarker width + 4px padding + 6px padding
padding: 6px 4px 6px 6px;
margin: 0px;
}

View file

@ -30,6 +30,10 @@
}
}
#zotero-tabs-toolbar {
background: var(--material-tabbar);
}
.tab-bar-inner-container {
display: flex;

View file

@ -66,14 +66,32 @@
}
.tag-selector-actions {
appearance: none;
flex-shrink: 0;
border-radius: 5px;
margin: 0;
-moz-context-properties: fill, fill-opacity, stroke, stroke-opacity;
background-color: transparent;
align-self: center;
background-color: inherit;
border: 0;
display: block;
flex: 0 1;
padding: 3px 4px;
white-space: nowrap;
&:hover {
background-color: var(--fill-quinary);
}
&:active, &[selected] {
background-color: var(--fill-quarternary);
}
&:focus-visible {
outline: none;
box-shadow: 0 0 0 var(--width-focus-border) var(--color-focus-border);
}
.icon-css {
fill: var(--fill-secondary);
}

View file

@ -0,0 +1,113 @@
.toolbar {
height: 41px !important; /* Hard-code this to fix toolbar icon compression on Linux */
min-height: 41px; /* Needed to prevent squashing by stretched tag selector */
margin: 0;
padding: 0px 8px 0px 8px;
min-width: 1px;
}
/* A decent hack: reverse the effective order of the dropmarker and icon in RTL
mode so that the above CSS, which places the menubutton-start.png background
on the toolbarbutton-icon, will make sense. (Otherwise the dropmarker appears
outside the button.) Then just flip the entire thing horizontally! We want to
do that anyway so that the Locate button will point to the left and Sync will
rotate counter-clockwise.
The other way to do this would be to set direction: ltr on buttons in the
RTL toolbar, but that breaks popup positioning. */
#zotero-pane[dir=rtl] {
.zotero-tb-button > .toolbarbutton-menu-dropmarker {
-moz-box-ordinal-group: 0;
}
.zotero-tb-button > .toolbarbutton-icon {
-moz-box-ordinal-group: 1;
}
.zotero-tb-button,
.zotero-tb-button:first-child,
.zotero-tb-button:last-child {
transform: scaleX(-1);
}
@media not (-moz-platform: macos) {
.zotero-tb-button > .toolbarbutton-icon {
transform: scaleX(-1);
}
}
}
.zotero-toolbar {
-moz-appearance: none;
@media (-moz-platform: macos) {
-moz-window-dragging: drag;
}
@media not (-moz-platform: macos) {
-moz-window-dragging: no-drag;
}
}
#zotero-layout-switcher .zotero-toolbar {
background: var(--material-toolbar);
border-bottom: var(--material-panedivider);
}
#zotero-collections-toolbar,
#zotero-items-toolbar,
#zotero-item-pane-header,
#zotero-tabs-toolbar {
toolbarbutton {
width: 28px;
height: 28px;
padding: 0px 4px 0px 4px;
margin: 0px 4px 0px 4px;
&[type="menu"] {
min-width: 0;
width: 40px;
}
&:focus-visible {
outline: none;
box-shadow: 0 0 0 var(--width-focus-border) var(--color-focus-border);
}
}
&:first-child {
margin-left: 0px;
}
&:last-child {
margin-right: 0px;
}
}
#zotero-collections-search {
max-width: 0;
transition: max-width 0.5s ease;
padding: 0px 6px 0px 0px;
margin: 0;
appearance: none;
visibility: hidden;
}
#zotero-collections-search.visible {
max-width: 180px;
visibility: visible;
/* Avoids flickering between pointer and text cursor during transition */
cursor: text;
}
/* Hide collection search on pane collapse, otherwise it still shows when focused */
#zotero-collections-pane[collapsed=true] #zotero-collections-search.visible {
visibility: hidden;
}
/* Hide the add button on pane collapse. Otherwise, it may show on top of 'New Item' */
#zotero-collections-pane[collapsed=true] #zotero-tb-collection-add {
visibility: hidden;
}
.zotero-tb-button {
-moz-user-focus: normal;
}

View file

@ -0,0 +1,84 @@
toolbarbutton {
appearance: none;
flex-shrink: 0;
&:not(.titlebar-button) {
border-radius: 5px;
}
margin: 0;
color: var(--fill-secondary);
-moz-context-properties: fill, fill-opacity, stroke, stroke-opacity;
background-color: transparent;
.toolbarbutton-menu-dropmarker {
-moz-default-appearance: none;
display: block;
visibility: visible;
@include svgicon-menu("chevron-8", "universal", "8");
color: var(--fill-secondary);
width: 8px;
height: 8px;
}
&:hover {
background-color: var(--fill-quinary);
}
&:active, &[selected] {
background-color: var(--fill-quarternary);
}
&:disabled,
&[disabled="true"] {
background-color: transparent;
color: var(--fill-tertiary);
.toolbarbutton-menu-dropmarker {
color: var(--fill-tertiary);
}
}
&[open="true"] {
background-color: var(--fill-quarternary);
}
}
@keyframes rotating {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
toolbarbutton[status=animate] {
.toolbarbutton-icon {
color: var(--fill-secondary);
animation: rotating 2s linear infinite;
}
}
.zotero-tb-separator {
height: 36px;
border-right: var(--material-panedivider);
}
$toolbarbutton-icons: (
collection-add: "add-collection",
collections-search: "magnifier",
add: "add-item",
lookup: "magic-wand",
attachment-add: "add-file",
note-add: "note",
opened-tabs: "chevron",
sync-stop: "stop-sync",
sync-error: "error",
sync: "sync",
);
@each $cls, $icon in $toolbarbutton-icons {
#zotero-tb-#{$cls} {
@include svgicon-menu($icon, "universal", "20");
}
};

View file

@ -130,12 +130,7 @@
}
&.selected:not(.highlighted) {
@media (-moz-platform: windows) {
background-color: var(--accent-blue);
}
@media not (-moz-platform: windows) {
background-color: SelectedItem;
}
background-color: var(--color-accent);
color: #fff;
@include state(".virtualized-table:not(:focus)") {

View file

@ -31,6 +31,6 @@ pane-header {
}
.menu-button toolbarbutton {
list-style-image: icon-url('locate.svg');
@include svgicon-menu("go-to", "universal", "20");
}
}

View file

@ -1,37 +1,64 @@
// | 6px padding | 16px icon width | 2px padding | 8px dropmarker width | 4px padding |
quick-search-textbox {
--search-textbox-width: 172px;
font-size: var(--zotero-font-size);
margin-right: 0;
width: 172px;
height: 25px;
}
width: var(--search-textbox-width);
height: 28px;
*[zoteroFontSize=small] quick-search-textbox {
font-size: 11px;
}
*[zoteroFontSize=small] {
font-size: 11px;
}
#zotero-tb-search-menu-button {
margin: 0;
padding: 0;
-moz-appearance: none;
min-width: 0;
cursor: default;
list-style-image: url("chrome://zotero/skin/searchbar-dropmarker.png");
}
#zotero-tb-search-menu-button .button-icon {
width: 7px;
}
#zotero-tb-search-menu-button .button-menu-dropmarker {
display: none; /* Hide automatic dropmarker */
:is(search-textbox)::part(search-sign),
:is(search-textbox)::part(search-icon) {
@include svgicon-menu("magnifier", "universal", "16");
color: var(--fill-secondary);
// right: 2px padding + 8px dropmarker width + 4px padding + 6px padding
padding: 6px 14px 6px 6px;
margin: 0px;
}
}
#zotero-tb-search-dropmarker {
position: relative;
left: 38px;
// 6px padding + 16px icon width + 2px padding + 8px dropmarker width + 4px padding
width: 36px;
margin-right: -36px;
z-index: 2;
}
/* BEGIN 2X BLOCK -- DO NOT EDIT MANUALLY -- USE 2XIZE */
@media (min-resolution: 1.25dppx) {
#zotero-tb-search-menu-button { list-style-image: url("chrome://zotero/skin/searchbar-dropmarker@2x.png"); }
#zotero-tb-search-menu-button {
width: 36px;
height: 28px;
// 6px padding + 16px icon width + 2px padding
padding: 0px 4px 0px 24px;
margin: 0;
border: 0;
border-radius: 5px;
appearance: none;
min-width: 0;
cursor: default;
@include svgicon-menu("chevron-6", "universal", "8");
color: var(--fill-secondary);
background: transparent;
&:focus-visible {
outline: none;
box-shadow: 0 0 0 var(--width-focus-border) var(--color-focus-border);
}
.button-menu-dropmarker {
display: none; /* Hide automatic dropmarker */
}
}
#zotero-tb-search-textbox {
padding: 0px 6px 0px 0px;
margin: 0;
position: relative;
left: 0px;
width: var(--search-textbox-width);
height: 28px;
z-index: 1;
}

View file

@ -18,14 +18,14 @@ richlistcheckbox[selected="true"] {
}
richlistbox:where(:focus) > richlistcheckbox[selected="true"] {
background-color: SelectedItem;
background-color: var(--color-accent);
color: SelectedItemText;
}
richlistbox[seltype="multiple"]:focus > richlistcheckbox[current="true"],
richlistbox.theme-listbox:focus > richlistcheckbox[current="true"] {
outline: var(--default-focusring);
outline-color: SelectedItem;
outline-color: var(--color-accent);
outline-offset: calc(-1 * var(--default-focusring-width));
}

View file

@ -1,4 +1,4 @@
menupopup, panel {
menupopup, panel, #search-mode-popup {
--panel-padding-block: 0;
--panel-border-radius: 6px;
--panel-background: var(--material-toolbar);

View file

@ -1,6 +0,0 @@
.search .search-cancel-button {
background-image: url(chrome://global/skin/icons/input-clear.svg);
width: 14px;
height: 14px;
top: 8px;
}

View file

@ -1,4 +0,0 @@
.tag-selector-actions {
display: flex;
align-items: center;
}

View file

@ -1,14 +0,0 @@
#zotero-tb-search-menu-button {
list-style-image: none; /* Dropmarker added automatically on Linux */
-moz-appearance: toolbarbutton-dropdown !important;
width: 12px;
height: 12px;
}
#zotero-tb-search-dropmarker {
left: 44px;
}
#zotero-tb-search .textbox-search-icon {
visibility: hidden;
}

View file

@ -1,3 +0,0 @@
#titlebar {
//-moz-appearance: -moz-mac-vibrant-titlebar-light !important;
}

92
scss/mac/_menupopup.scss Normal file
View file

@ -0,0 +1,92 @@
menupopup {
color-scheme: auto;
--panel-padding: 5px 0;
menu, menuitem {
margin-left: 5px;
margin-right: 5px;
padding: 3px 10px 3px 10px;
border-radius: 4px;
&[_moz-menuactive] {
appearance: none;
// Try best to match the native menu style
@include light-dark(
background-color, color-mix(in srgb, -moz-mac-active-menuitem 75%, transparent),
color-mix(in srgb, -moz-mac-active-menuitem 90%, transparent)
);
color: -moz-mac-menutextselect;
}
&:is([checked="true"], [selected="true"]) {
appearance: none !important;
border-radius: 4px;
&::before {
content: '\2713';
display: inline-block;
vertical-align: middle;
line-height: 0;
width: 15px;
margin-inline-start: 0px !important;
}
}
&[disabled="true"] {
appearance: auto;
}
}
menuseparator {
appearance: none;
margin-left: 15px;
margin-right: 15px;
border-bottom: 1px solid;
padding-bottom: 0px;
@include light-dark(border-color, rgba(170, 170, 170, 0.5), rgba(100, 100, 100, 0.5));
}
}
// Modified based on rules from https://searchfox.org/mozilla-esr102/source/browser/base/content/browser.css
/* On Mac, use the properties "-moz-window-transform" and "-moz-window-opacity"
instead of "transform" and "opacity" for these animations.
The -moz-window* properties apply to the whole window including the window's
shadow, and they don't affect the window's "shape", so the system doesn't
have to recompute the shadow shape during the animation. This makes them a
lot faster. In fact, Gecko no longer triggers shadow shape recomputations
for repaints.
These properties are not implemented on other platforms. */
menupopup:not([animate="false"]) {
transition-property: -moz-window-transform, -moz-window-opacity;
transition-duration: 0.18s, 0.18s;
transition-timing-function:
var(--animation-easing-function), ease-out;
}
/* Only do the fade-in animation on pre-Big Sur to avoid missing shadows on
* Big Sur, see bug 1672091. */
@media (-moz-mac-big-sur-theme: 0) {
menupopup:not([animate="false"]) {
-moz-window-opacity: 0;
-moz-window-transform: translateY(-70px);
}
menupopup[side="bottom"]:not([animate="false"]) {
-moz-window-transform: translateY(70px);
}
}
/* [animate] is here only so that this rule has greater specificity than the
* rule right above */
menupopup[animate][animate="open"] {
-moz-window-opacity: 1.0;
transition-duration: 0.18s, 0.18s;
-moz-window-transform: none;
transition-timing-function:
var(--animation-easing-function), ease-in-out;
}
menupopup[animate][animate="cancel"] {
-moz-window-opacity: 0;
-moz-window-transform: none;
}
// End of browser.css

View file

@ -1,11 +0,0 @@
.search input {
-moz-appearance: searchfield;
}
.search .search-cancel-button {
background-image: url(resource://gre-resources/searchfield-cancel.svg);
width: 14px;
height: 14px;
top: 10px;
right: 8px;
}

View file

@ -1,5 +0,0 @@
//
// Tag selector
// --------------------------------------------------

View file

@ -1,4 +0,0 @@
#zotero-tb-search-menu-button {
margin: -6px 0 0 -18px;
padding: 6px 0 0 15px;
}

View file

@ -1,4 +1,4 @@
menupopup, panel {
menupopup, panel, #search-mode-popup {
--panel-border-radius: 8px;
--panel-background: var(--material-toolbar);
--menuitem-hover-background-color: var(--fill-quinary);

View file

@ -1,19 +0,0 @@
.search input {
height: 24px;
}
.search .search-cancel-button {
background-image: url(chrome://global/skin/icons/Search-close.png);
background-position: left 0 top 0;
width: 12px;
height: 12px;
top: 4px;
}
.search .search-cancel-button:hover {
background-position: left 32px top 0;
}
.search .search-cancel-button:hover:active {
background-position: left 16px top 0;
}

View file

@ -1,10 +0,0 @@
.tag-selector-item {
padding-bottom: .6em;
}
.tag-selector-actions {
margin-top: -1px;
margin-right: 1px;
margin-bottom: 3px;
line-height: 12px;
}

View file

@ -1,14 +0,0 @@
#zotero-tb-search-menu-button {
margin: 0 -1px 0 -4px;
padding: 5px 0 5px 5px;
border: 0;
background: transparent;
}
#zotero-tb-search-dropmarker {
left: 27px;
}
#zotero-tb-search .textbox-search-icon {
visibility: hidden;
}

View file

@ -7,13 +7,10 @@
@import "mac/button";
@import "mac/createParent";
@import "mac/editable";
@import "mac/mainWindow";
@import "mac/search";
@import "mac/tabBar";
@import "mac/tag-selector";
@import "mac/menupopup";
// Elements
@import "mac/elements/attachmentBox";
@import "mac/elements/itemBox";
@import "mac/elements/quickSearchTextbox";

View file

@ -10,14 +10,10 @@
@import "linux/errorReport";
@import "linux/feedSettings";
@import "linux/menupopup";
@import "linux/search";
@import "linux/tabBar";
@import "linux/titleBar";
@import "linux/tagsBox";
@import "linux/tagSelector";
// Elements
@import "linux/elements/itemBox";
@import "linux/elements/noteEditor";
@import "linux/elements/quickSearchTextbox";

View file

@ -5,13 +5,10 @@
// --------------------------------------------------
@import "win/createParent";
@import "win/search";
@import "win/tabBar";
@import "win/titleBar";
@import "win/menupopup";
@import "win/tag-selector";
// Elements
@import "win/elements/itemBox";
@import "win/elements/quickSearchTextbox";