Use old toolbar if not a PDF build
This commit is contained in:
parent
e1c0f6c1a0
commit
28c1504cdd
3 changed files with 184 additions and 174 deletions
|
@ -42,7 +42,7 @@ const ZoteroStandalone = new function() {
|
||||||
window.document.documentElement.setAttribute('sizemode', 'normal');
|
window.document.documentElement.setAttribute('sizemode', 'normal');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Zotero.isMac) {
|
if (Zotero.isMac && Zotero.isPDFBuild) {
|
||||||
document.documentElement.setAttribute('drawintitlebar', true);
|
document.documentElement.setAttribute('drawintitlebar', true);
|
||||||
document.documentElement.setAttribute('tabsintitlebar', true);
|
document.documentElement.setAttribute('tabsintitlebar', true);
|
||||||
document.documentElement.setAttribute('chromemargin', '0,-1,-1,-1');
|
document.documentElement.setAttribute('chromemargin', '0,-1,-1,-1');
|
||||||
|
|
|
@ -69,6 +69,13 @@ var ZoteroPane = new function()
|
||||||
this.init = function () {
|
this.init = function () {
|
||||||
Zotero.debug("Initializing Zotero pane");
|
Zotero.debug("Initializing Zotero pane");
|
||||||
|
|
||||||
|
if (!Zotero.isPDFBuild) {
|
||||||
|
let win = document.getElementById('main-window')
|
||||||
|
win.setAttribute('legacytoolbar', 'true');
|
||||||
|
document.getElementById('titlebar').hidden = true;
|
||||||
|
document.getElementById('tab-bar-container').hidden = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Set key down handler
|
// Set key down handler
|
||||||
document.getElementById('appcontent').addEventListener('keydown', ZoteroPane_Local.handleKeyDown, true);
|
document.getElementById('appcontent').addEventListener('keydown', ZoteroPane_Local.handleKeyDown, true);
|
||||||
|
|
||||||
|
@ -1197,7 +1204,9 @@ var ZoteroPane = new function()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rename tab
|
// Rename tab
|
||||||
Zotero_Tabs.rename('zotero-pane', collectionTreeRow.getName());
|
if (Zotero.isPDFBuild) {
|
||||||
|
Zotero_Tabs.rename('zotero-pane', collectionTreeRow.getName());
|
||||||
|
}
|
||||||
ZoteroItemPane.switchEditorEngine(Zotero.Libraries.get(collectionTreeRow.ref.libraryID).libraryType);
|
ZoteroItemPane.switchEditorEngine(Zotero.Libraries.get(collectionTreeRow.ref.libraryID).libraryType);
|
||||||
|
|
||||||
// Clear quick search and tag selector when switching views
|
// Clear quick search and tag selector when switching views
|
||||||
|
|
|
@ -1,173 +1,174 @@
|
||||||
:root {
|
// Styling for displaying tabs in the title bar
|
||||||
--tab-min-height: 30px;
|
:root:not([legacytoolbar="true"]) {
|
||||||
--tabs-border-color: rgba(0,0,0,.3);
|
& {
|
||||||
--tabline-color: #0a84ff;
|
--tab-min-height: 30px;
|
||||||
|
--tabs-border-color: rgba(0,0,0,.3);
|
||||||
|
--tabline-color: #0a84ff;
|
||||||
|
|
||||||
--toolbar-non-lwt-bgcolor: #f9f9fa;
|
--toolbar-non-lwt-bgcolor: #f9f9fa;
|
||||||
--toolbar-non-lwt-textcolor: #0c0c0d;
|
--toolbar-non-lwt-textcolor: #0c0c0d;
|
||||||
--toolbar-non-lwt-bgimage: none;
|
--toolbar-non-lwt-bgimage: none;
|
||||||
--toolbar-bgcolor: var(--toolbar-non-lwt-bgcolor);
|
--toolbar-bgcolor: var(--toolbar-non-lwt-bgcolor);
|
||||||
--toolbar-bgimage: var(--toolbar-non-lwt-bgimage);
|
--toolbar-bgimage: var(--toolbar-non-lwt-bgimage);
|
||||||
--chrome-content-separator-color: hsl(0, 0%, 60%);
|
--chrome-content-separator-color: hsl(0, 0%, 60%);
|
||||||
|
|
||||||
--toolbarbutton-border-radius: 3px;
|
--toolbarbutton-border-radius: 3px;
|
||||||
--toolbarbutton-icon-fill-opacity: .85;
|
--toolbarbutton-icon-fill-opacity: .85;
|
||||||
--toolbarbutton-hover-background: hsla(0, 0%, 100%, .1)
|
--toolbarbutton-hover-background: hsla(0, 0%, 100%, .1)
|
||||||
linear-gradient(hsla(0, 0%, 100%, .3),
|
linear-gradient(hsla(0, 0%, 100%, .3),
|
||||||
hsla(0, 0%, 100%, .1)) no-repeat;
|
hsla(0, 0%, 100%, .1)) no-repeat;
|
||||||
--toolbarbutton-hover-bordercolor: hsla(0, 0%, 0%, .2);
|
--toolbarbutton-hover-bordercolor: hsla(0, 0%, 0%, .2);
|
||||||
--toolbarbutton-header-bordercolor: hsla(0, 0%, 0%, .2);
|
--toolbarbutton-header-bordercolor: hsla(0, 0%, 0%, .2);
|
||||||
--toolbarbutton-hover-boxshadow: 0 1px 0 hsla(0, 0%, 100%, .5),
|
--toolbarbutton-hover-boxshadow: 0 1px 0 hsla(0, 0%, 100%, .5),
|
||||||
0 1px 0 hsla(0, 0%, 100%, .5) inset;
|
0 1px 0 hsla(0, 0%, 100%, .5) inset;
|
||||||
|
|
||||||
--toolbarbutton-active-background: hsla(0, 0%, 0%, .02)
|
--toolbarbutton-active-background: hsla(0, 0%, 0%, .02)
|
||||||
linear-gradient(hsla(0, 0%, 0%, .12),
|
linear-gradient(hsla(0, 0%, 0%, .12),
|
||||||
transparent) border-box;
|
transparent) border-box;
|
||||||
--toolbarbutton-active-bordercolor: hsla(0, 0%, 0%, .3);
|
--toolbarbutton-active-bordercolor: hsla(0, 0%, 0%, .3);
|
||||||
--toolbarbutton-active-boxshadow: 0 1px 0 hsla(0, 0%, 100%, .5),
|
--toolbarbutton-active-boxshadow: 0 1px 0 hsla(0, 0%, 100%, .5),
|
||||||
0 1px 0 hsla(0, 0%, 0%, .05) inset,
|
0 1px 0 hsla(0, 0%, 0%, .05) inset,
|
||||||
0 1px 1px hsla(0, 0%, 0%, .2) inset;
|
0 1px 1px hsla(0, 0%, 0%, .2) inset;
|
||||||
--toolbarbutton-inactive-bordercolor: rgba(0, 0, 0, 0.1);
|
--toolbarbutton-inactive-bordercolor: rgba(0, 0, 0, 0.1);
|
||||||
--toolbarbutton-inactive-boxshadow: 0 1px 0 hsla(0, 0%, 0%, .05) inset;
|
--toolbarbutton-inactive-boxshadow: 0 1px 0 hsla(0, 0%, 0%, .05) inset;
|
||||||
--toolbarbutton-checkedhover-backgroundcolor: hsla(0, 0%, 0%, .09);
|
--toolbarbutton-checkedhover-backgroundcolor: hsla(0, 0%, 0%, .09);
|
||||||
--toolbarbutton-icon-fill-attention: var(--lwt-toolbarbutton-icon-fill-attention, #0a84ff);
|
--toolbarbutton-icon-fill-attention: var(--lwt-toolbarbutton-icon-fill-attention, #0a84ff);
|
||||||
|
|
||||||
--lwt-header-image: none;
|
--lwt-header-image: none;
|
||||||
--row-grouped-header-bg-color: #d5d5d5;
|
--row-grouped-header-bg-color: #d5d5d5;
|
||||||
--row-grouped-header-bg-color-selected: #3874d1;
|
--row-grouped-header-bg-color-selected: #3874d1;
|
||||||
--panel-separator-color: hsla(210, 4%, 10%, .14);
|
--panel-separator-color: hsla(210, 4%, 10%, .14);
|
||||||
--arrowpanel-dimmed: hsla(0, 0%, 80%, .3);
|
--arrowpanel-dimmed: hsla(0, 0%, 80%, .3);
|
||||||
--arrowpanel-dimmed-further: hsla(0, 0%, 80%, .45);
|
--arrowpanel-dimmed-further: hsla(0, 0%, 80%, .45);
|
||||||
--splitter-color: #bdbdbd;
|
--splitter-color: #bdbdbd;
|
||||||
--urlbar-popup-url-color: hsl(210, 77%, 47%);
|
--urlbar-popup-url-color: hsl(210, 77%, 47%);
|
||||||
--urlbar-popup-action-color: hsl(178, 100%, 28%);
|
--urlbar-popup-action-color: hsl(178, 100%, 28%);
|
||||||
}
|
|
||||||
|
--autocomplete-popup-background: -moz-field;
|
||||||
:root {
|
--autocomplete-popup-color: -moz-fieldtext;
|
||||||
--autocomplete-popup-background: -moz-field;
|
--autocomplete-popup-border-color: ThreeDShadow;
|
||||||
--autocomplete-popup-color: -moz-fieldtext;
|
--autocomplete-popup-highlight-background: Highlight;
|
||||||
--autocomplete-popup-border-color: ThreeDShadow;
|
--autocomplete-popup-highlight-color: HighlightText;
|
||||||
--autocomplete-popup-highlight-background: Highlight;
|
/* Note: Setting this to 0 (without px) breaks CSS calculations for OSX. */
|
||||||
--autocomplete-popup-highlight-color: HighlightText;
|
--space-above-tabbar: 0px;
|
||||||
/* Note: Setting this to 0 (without px) breaks CSS calculations for OSX. */
|
}
|
||||||
--space-above-tabbar: 0px;
|
|
||||||
}
|
&:-moz-window-inactive {
|
||||||
|
--toolbar-bgcolor: -moz-mac-chrome-inactive;
|
||||||
:root:-moz-window-inactive {
|
}
|
||||||
--toolbar-bgcolor: -moz-mac-chrome-inactive;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
#titlebar {
|
||||||
|
margin-bottom: -30px;
|
||||||
#titlebar {
|
-moz-box-pack: center;
|
||||||
margin-bottom: -30px;
|
}
|
||||||
-moz-box-pack: center;
|
|
||||||
}
|
#personal-bookmarks {
|
||||||
|
-moz-window-dragging: inherit;
|
||||||
#personal-bookmarks {
|
}
|
||||||
-moz-window-dragging: inherit;
|
|
||||||
}
|
toolbarpaletteitem {
|
||||||
|
-moz-window-dragging: no-drag;
|
||||||
toolbarpaletteitem {
|
-moz-box-pack: start;
|
||||||
-moz-window-dragging: no-drag;
|
}
|
||||||
-moz-box-pack: start;
|
|
||||||
}
|
.titlebar-buttonbox-container {
|
||||||
|
-moz-box-ordinal-group: 1000;
|
||||||
.titlebar-buttonbox-container {
|
}
|
||||||
-moz-box-ordinal-group: 1000;
|
|
||||||
}
|
#titlebar-fullscreen-button {
|
||||||
|
-moz-appearance: -moz-mac-fullscreen-button;
|
||||||
#titlebar-fullscreen-button {
|
}
|
||||||
-moz-appearance: -moz-mac-fullscreen-button;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ::::: Tabs in Titlebar :::::: */
|
||||||
|
|
||||||
/* ::::: Tabs in Titlebar :::::: */
|
&:not([chromemargin]) > #titlebar {
|
||||||
|
display: none;
|
||||||
#main-window:not([chromemargin]) > #titlebar {
|
}
|
||||||
display: none;
|
|
||||||
}
|
/**
|
||||||
|
* For tabs in titlebar on OS X, we stretch the titlebar down so that the
|
||||||
/**
|
* tabstrip can overlap it.
|
||||||
* For tabs in titlebar on OS X, we stretch the titlebar down so that the
|
*/
|
||||||
* tabstrip can overlap it.
|
&[tabsintitlebar] > #titlebar {
|
||||||
*/
|
min-height: calc(var(--tab-min-height) + var(--space-above-tabbar));
|
||||||
#main-window[tabsintitlebar] > #titlebar {
|
}
|
||||||
min-height: calc(var(--tab-min-height) + var(--space-above-tabbar));
|
|
||||||
}
|
&[tabsintitlebar="true"]:not(:-moz-lwtheme) > #titlebar {
|
||||||
|
-moz-appearance: -moz-window-titlebar;
|
||||||
#main-window[tabsintitlebar="true"]:not(:-moz-lwtheme) > #titlebar {
|
}
|
||||||
-moz-appearance: -moz-window-titlebar;
|
|
||||||
}
|
&:not([tabsintitlebar]) .titlebar-placeholder {
|
||||||
|
visibility: collapse;
|
||||||
#main-window:not([tabsintitlebar]) .titlebar-placeholder {
|
}
|
||||||
visibility: collapse;
|
|
||||||
}
|
/* NB: these would be margin-inline-start/end if it wasn't for the fact that OS X
|
||||||
|
* doesn't reverse the order of the items in the titlebar in RTL mode. */
|
||||||
/* NB: these would be margin-inline-start/end if it wasn't for the fact that OS X
|
.titlebar-placeholder[type="caption-buttons"],
|
||||||
* doesn't reverse the order of the items in the titlebar in RTL mode. */
|
#titlebar-buttonbox {
|
||||||
.titlebar-placeholder[type="caption-buttons"],
|
margin-right: 12px;
|
||||||
#titlebar-buttonbox {
|
margin-left: 12px;
|
||||||
margin-right: 12px;
|
}
|
||||||
margin-left: 12px;
|
|
||||||
}
|
.titlebar-placeholder[type="fullscreen-button"],
|
||||||
|
#titlebar-fullscreen-button {
|
||||||
.titlebar-placeholder[type="fullscreen-button"],
|
margin-right: 7px;
|
||||||
#titlebar-fullscreen-button {
|
margin-left: 7px;
|
||||||
margin-right: 7px;
|
}
|
||||||
margin-left: 7px;
|
|
||||||
}
|
#titlebar-fullscreen-button {
|
||||||
|
-moz-appearance: -moz-mac-fullscreen-button;
|
||||||
#titlebar-fullscreen-button {
|
}
|
||||||
-moz-appearance: -moz-mac-fullscreen-button;
|
|
||||||
}
|
#titlebar-buttonbox {
|
||||||
|
-moz-appearance: -moz-window-button-box;
|
||||||
#titlebar-buttonbox {
|
}
|
||||||
-moz-appearance: -moz-window-button-box;
|
|
||||||
}
|
/* Fullscreen and caption buttons don't move with RTL on OS X so override the automatic ordering. */
|
||||||
|
#titlebar-fullscreen-button:-moz-locale-dir(ltr),
|
||||||
/* Fullscreen and caption buttons don't move with RTL on OS X so override the automatic ordering. */
|
#titlebar-buttonbox-container:-moz-locale-dir(rtl),
|
||||||
#titlebar-fullscreen-button:-moz-locale-dir(ltr),
|
.titlebar-placeholder[type="fullscreen-button"]:-moz-locale-dir(ltr),
|
||||||
#titlebar-buttonbox-container:-moz-locale-dir(rtl),
|
.titlebar-placeholder[type="caption-buttons"]:-moz-locale-dir(rtl) {
|
||||||
.titlebar-placeholder[type="fullscreen-button"]:-moz-locale-dir(ltr),
|
-moz-box-ordinal-group: 1000;
|
||||||
.titlebar-placeholder[type="caption-buttons"]:-moz-locale-dir(rtl) {
|
}
|
||||||
-moz-box-ordinal-group: 1000;
|
|
||||||
}
|
#titlebar-fullscreen-button:-moz-locale-dir(rtl),
|
||||||
|
#titlebar-buttonbox-container:-moz-locale-dir(ltr),
|
||||||
#titlebar-fullscreen-button:-moz-locale-dir(rtl),
|
.titlebar-placeholder[type="caption-buttons"]:-moz-locale-dir(ltr),
|
||||||
#titlebar-buttonbox-container:-moz-locale-dir(ltr),
|
.titlebar-placeholder[type="fullscreen-button"]:-moz-locale-dir(rtl) {
|
||||||
.titlebar-placeholder[type="caption-buttons"]:-moz-locale-dir(ltr),
|
-moz-box-ordinal-group: 0;
|
||||||
.titlebar-placeholder[type="fullscreen-button"]:-moz-locale-dir(rtl) {
|
}
|
||||||
-moz-box-ordinal-group: 0;
|
|
||||||
}
|
&[sizemode="fullscreen"] .titlebar-placeholder[type="fullscreen-button"],
|
||||||
|
&[sizemode="fullscreen"] .titlebar-placeholder[type="caption-buttons"] {
|
||||||
#main-window[sizemode="fullscreen"] .titlebar-placeholder[type="fullscreen-button"],
|
display: none;
|
||||||
#main-window[sizemode="fullscreen"] .titlebar-placeholder[type="caption-buttons"] {
|
}
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#tab-bar-container {
|
||||||
|
-moz-window-dragging: drag;
|
||||||
#tab-bar-container {
|
}
|
||||||
-moz-window-dragging: drag;
|
|
||||||
}
|
#tab-bar-container .tab {
|
||||||
|
background: $transparent;
|
||||||
#tab-bar-container .tab {
|
}
|
||||||
background: $transparent;
|
|
||||||
}
|
#tab-bar-container .tab.selected {
|
||||||
|
background: $toolbar-background-color;
|
||||||
#tab-bar-container .tab.selected {
|
}
|
||||||
background: $toolbar-background-color;
|
|
||||||
}
|
#zotero-toolbar {
|
||||||
|
-moz-appearance: none;
|
||||||
#zotero-toolbar {
|
background: $toolbar-background-color;
|
||||||
-moz-appearance: none;
|
border-bottom: $toolbar-border;
|
||||||
background: $toolbar-background-color;
|
}
|
||||||
border-bottom: $toolbar-border;
|
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue