From 85c14af6dbd3cbfbf252b1fad75f26bef56f2542 Mon Sep 17 00:00:00 2001 From: Anodev-sudo <205236663+Anodev-sudo@users.noreply.github.com> Date: Wed, 12 Nov 2025 23:51:52 -0600 Subject: [PATCH] fix: Fix bookmarks toolbar flickering when in sidebar-only mode --- src/zen/tabs/zen-tabs.css | 7 +++++-- .../zen-tabs/vertical-tabs-topbar.inc.css | 21 ++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/zen/tabs/zen-tabs.css b/src/zen/tabs/zen-tabs.css index c285f08016..6e0579aa5e 100644 --- a/src/zen/tabs/zen-tabs.css +++ b/src/zen/tabs/zen-tabs.css @@ -34,10 +34,12 @@ /* Include styles for the top bar under certain conditions: * - Bookmarks toolbar is visible OR - * - The container is explicitly marked to hide controls (e.g., on Linux with reversed controls) + * - The container is explicitly marked to hide controls (e.g., on Linux with reversed controls) OR + * - Sidebar is on the left (to prevent flash when toggling bookmarks) */ :root[zen-has-bookmarks] &, - &[should-hide='true'] { + &[should-hide='true'], + :root:not([zen-right-side='true']) & { %include zen-tabs/vertical-tabs-topbar.inc.css } @@ -49,6 +51,7 @@ pointer-events: none !important; } } + } diff --git a/src/zen/tabs/zen-tabs/vertical-tabs-topbar.inc.css b/src/zen/tabs/zen-tabs/vertical-tabs-topbar.inc.css index ee18670378..707cf1378b 100644 --- a/src/zen/tabs/zen-tabs/vertical-tabs-topbar.inc.css +++ b/src/zen/tabs/zen-tabs/vertical-tabs-topbar.inc.css @@ -9,6 +9,10 @@ height: var(--zen-toolbar-height); z-index: 1; +& .zen-toolbar-background { + display: flex; +} + #zen-appcontent-navbar-container { display: flex; min-height: var(--zen-toolbar-height); @@ -22,7 +26,8 @@ z-index: 1; %include ../../compact-mode/windows-captions-fix-active.inc.css - &:not([zen-has-hover='true']):not([has-popup-menu]):not([zen-compact-mode-active]) { + &:not([zen-has-hover='true']):not([has-popup-menu]):not([zen-compact-mode-active]), + :root:not([zen-right-side='true']):not([zen-has-bookmarks]) & { height: var(--zen-element-separation); opacity: 0; & #zen-appcontent-navbar-container { @@ -41,3 +46,17 @@ z-index: 1; } } } + +/* When sidebar is on left, position contents absolutely to overlay on hover */ +:root:not([zen-right-side='true']) & { + /* Keep wrapper in flow to reserve space, but position contents absolutely */ + position: relative; + + & #zen-appcontent-navbar-container { + position: absolute; + top: 0; + left: 0; + right: 0; + z-index: 10; + } +}