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');
|
||||
}
|
||||
|
||||
if (Zotero.isMac) {
|
||||
if (Zotero.isMac && Zotero.isPDFBuild) {
|
||||
document.documentElement.setAttribute('drawintitlebar', true);
|
||||
document.documentElement.setAttribute('tabsintitlebar', true);
|
||||
document.documentElement.setAttribute('chromemargin', '0,-1,-1,-1');
|
||||
|
|
|
@ -69,6 +69,13 @@ var ZoteroPane = new function()
|
|||
this.init = function () {
|
||||
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
|
||||
document.getElementById('appcontent').addEventListener('keydown', ZoteroPane_Local.handleKeyDown, true);
|
||||
|
||||
|
@ -1197,7 +1204,9 @@ var ZoteroPane = new function()
|
|||
}
|
||||
|
||||
// Rename tab
|
||||
if (Zotero.isPDFBuild) {
|
||||
Zotero_Tabs.rename('zotero-pane', collectionTreeRow.getName());
|
||||
}
|
||||
ZoteroItemPane.switchEditorEngine(Zotero.Libraries.get(collectionTreeRow.ref.libraryID).libraryType);
|
||||
|
||||
// Clear quick search and tag selector when switching views
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
:root {
|
||||
// Styling for displaying tabs in the title bar
|
||||
:root:not([legacytoolbar="true"]) {
|
||||
& {
|
||||
--tab-min-height: 30px;
|
||||
--tabs-border-color: rgba(0,0,0,.3);
|
||||
--tabline-color: #0a84ff;
|
||||
|
@ -41,9 +43,7 @@
|
|||
--splitter-color: #bdbdbd;
|
||||
--urlbar-popup-url-color: hsl(210, 77%, 47%);
|
||||
--urlbar-popup-action-color: hsl(178, 100%, 28%);
|
||||
}
|
||||
|
||||
:root {
|
||||
--autocomplete-popup-background: -moz-field;
|
||||
--autocomplete-popup-color: -moz-fieldtext;
|
||||
--autocomplete-popup-border-color: ThreeDShadow;
|
||||
|
@ -53,7 +53,7 @@
|
|||
--space-above-tabbar: 0px;
|
||||
}
|
||||
|
||||
:root:-moz-window-inactive {
|
||||
&:-moz-window-inactive {
|
||||
--toolbar-bgcolor: -moz-mac-chrome-inactive;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ toolbarpaletteitem {
|
|||
|
||||
/* ::::: Tabs in Titlebar :::::: */
|
||||
|
||||
#main-window:not([chromemargin]) > #titlebar {
|
||||
&:not([chromemargin]) > #titlebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
@ -98,15 +98,15 @@ toolbarpaletteitem {
|
|||
* For tabs in titlebar on OS X, we stretch the titlebar down so that the
|
||||
* tabstrip can overlap it.
|
||||
*/
|
||||
#main-window[tabsintitlebar] > #titlebar {
|
||||
&[tabsintitlebar] > #titlebar {
|
||||
min-height: calc(var(--tab-min-height) + var(--space-above-tabbar));
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar="true"]:not(:-moz-lwtheme) > #titlebar {
|
||||
&[tabsintitlebar="true"]:not(:-moz-lwtheme) > #titlebar {
|
||||
-moz-appearance: -moz-window-titlebar;
|
||||
}
|
||||
|
||||
#main-window:not([tabsintitlebar]) .titlebar-placeholder {
|
||||
&:not([tabsintitlebar]) .titlebar-placeholder {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
|
@ -147,8 +147,8 @@ toolbarpaletteitem {
|
|||
-moz-box-ordinal-group: 0;
|
||||
}
|
||||
|
||||
#main-window[sizemode="fullscreen"] .titlebar-placeholder[type="fullscreen-button"],
|
||||
#main-window[sizemode="fullscreen"] .titlebar-placeholder[type="caption-buttons"] {
|
||||
&[sizemode="fullscreen"] .titlebar-placeholder[type="fullscreen-button"],
|
||||
&[sizemode="fullscreen"] .titlebar-placeholder[type="caption-buttons"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
@ -171,3 +171,4 @@ toolbarpaletteitem {
|
|||
background: $toolbar-background-color;
|
||||
border-bottom: $toolbar-border;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue