Prevent using single toolbar in popup windows and fixed one-offs UI

This commit is contained in:
mr. M
2024-12-05 18:35:38 +01:00
parent 3811d7739d
commit f6cbe1c4bc
4 changed files with 34 additions and 11 deletions

View File

@@ -122,6 +122,13 @@ var gZenVerticalTabsManager = {
|| Services.prefs.getBoolPref('zen.view.experimental-force-window-controls-left')); || Services.prefs.getBoolPref('zen.view.experimental-force-window-controls-left'));
}); });
ChromeUtils.defineLazyGetter(this, 'hidesTabsToolbar', () => {
return (
document.documentElement.getAttribute('chromehidden').includes('toolbar') ||
document.documentElement.getAttribute('chromehidden').includes('menubar')
);
});
var updateEvent = this._updateEvent.bind(this); var updateEvent = this._updateEvent.bind(this);
this.initializePreferences(updateEvent); this.initializePreferences(updateEvent);
@@ -264,7 +271,7 @@ var gZenVerticalTabsManager = {
const isVerticalTabs = this._prefsVerticalTabs || forceMultipleToolbar; const isVerticalTabs = this._prefsVerticalTabs || forceMultipleToolbar;
const isSidebarExpanded = this._prefsSidebarExpanded || !isVerticalTabs; const isSidebarExpanded = this._prefsSidebarExpanded || !isVerticalTabs;
const isRightSide = this._prefsRightSide && isVerticalTabs; const isRightSide = this._prefsRightSide && isVerticalTabs;
const isSingleToolbar = ((this._prefsUseSingleToolbar && (isVerticalTabs && isSidebarExpanded) )|| !isVerticalTabs) && !forceMultipleToolbar; const isSingleToolbar = ((this._prefsUseSingleToolbar && (isVerticalTabs && isSidebarExpanded) )|| !isVerticalTabs) && !forceMultipleToolbar && !this.hidesTabsToolbar;
const titlebar = document.getElementById('titlebar'); const titlebar = document.getElementById('titlebar');
gBrowser.tabContainer.setAttribute('orient', isVerticalTabs ? 'vertical' : 'horizontal'); gBrowser.tabContainer.setAttribute('orient', isVerticalTabs ? 'vertical' : 'horizontal');

View File

@@ -4,6 +4,10 @@ height: var(--zen-toolbar-height);
& { & {
transition: height 0.2s ease-out, opacity 0.2s ease-out; transition: height 0.2s ease-out, opacity 0.2s ease-out;
transition-delay: 0.05s; transition-delay: 0.05s;
:root[inDOMFullscreen='true'] & {
max-height: 0;
}
} }
&:not([zen-has-hover='true']):not([has-popup-menu]):not(:focus-within) { &:not([zen-has-hover='true']):not([has-popup-menu]):not(:focus-within) {

View File

@@ -328,6 +328,16 @@ button.popup-notification-dropmarker {
padding-right: var(--zen-element-separation) !important; padding-right: var(--zen-element-separation) !important;
}*/ }*/
#urlbar {
& .search-panel-one-offs-header {
display: none;
}
& .search-panel-one-offs-container .searchbar-engine-one-off-item {
box-shadow: none;
}
}
#urlbar[open] { #urlbar[open] {
z-index: 1000; z-index: 1000;
min-width: 600px; min-width: 600px;

View File

@@ -1398,6 +1398,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
const tab = gBrowser.getTabForBrowser(browser); const tab = gBrowser.getTabForBrowser(browser);
const workspaceID = tab.getAttribute('zen-workspace-id'); const workspaceID = tab.getAttribute('zen-workspace-id');
const isEssential = tab.getAttribute("zen-essential") === "true"; const isEssential = tab.getAttribute("zen-essential") === "true";
if (!isEssential) {
const activeWorkspace = await parent.ZenWorkspaces.getActiveWorkspace(); const activeWorkspace = await parent.ZenWorkspaces.getActiveWorkspace();
// Only update last selected tab for non-essential tabs in their workspace // Only update last selected tab for non-essential tabs in their workspace
@@ -1410,6 +1411,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
await parent.ZenWorkspaces.changeWorkspace({ uuid: workspaceID }); await parent.ZenWorkspaces.changeWorkspace({ uuid: workspaceID });
} }
} }
}
// Context menu management // Context menu management