zotero/scss/components/_toolbarbutton.scss
Dan Stillman 1694056956 Support multiple library tabs (#6035)
Additional library tabs can be opened via File → New Library Tab
(Cmd/Ctrl-T), a collection's context menu, or Duplicate Tab, and each
holds its own live library view. Library tabs share layout settings
(pane sizes, stacked or standard layout, and columns) and tag selector
display options, and a tab picks up the current ones when it's shown.
Closed library tabs reopen with their collections, selected items,
searches, and tag selection.

Every library tab can be closed, including the window's first one, so
a window can have no library view at all. Closing a window's last tab
closes the window, except for the last tab of the last window on
Windows and Linux, which stays open so that closing a tab doesn't quit
Zotero.

For backward compatibility with plugins, the window's first library
view keeps the original element ids. Other views append their tab's id
to each element id (e.g., zotero-items-tree-tab-k3Xq9TzA).

The onMainWindowLoad and onMainWindowUnload plugin hooks now follow a
window's library views rather than the window itself. Since a main
window might not have a library view, code that iterates
Zotero.getMainWindows() should check ZoteroPane.libraryView.
2026-11-06 20:58:05 -05:00

85 lines
1.6 KiB
SCSS

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;
&:hover {
background-color: var(--fill-quinary);
}
&:active, &[selected] {
background-color: var(--fill-quarternary);
}
@include focus-ring;
&:disabled,
&[disabled] {
background-color: transparent;
color: var(--fill-tertiary);
.toolbarbutton-menu-dropmarker {
color: var(--fill-tertiary);
}
}
&[open="true"] {
background-color: var(--fill-quarternary);
}
}
// Also hosted by plain <button>s, e.g., in the feed settings dialog
.toolbarbutton-menu-dropmarker {
-moz-default-appearance: none;
@include svgicon("chevron-6", "universal", "8");
color: var(--fill-secondary);
width: 8px;
height: 8px;
}
@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",
tabs-menu: "chevron",
sync-error: "error",
sync: "sync",
toggle-item-pane-stacked: "sidebar-bottom",
);
@each $cls, $icon in $toolbarbutton-icons {
:is(#zotero-tb-#{$cls}, .zotero-tb-#{$cls}) {
@include svgicon-menu($icon, "universal", "20");
}
};