gh-12973: Fixed compact mode toggle being always checked (gh-12977)

This commit is contained in:
mr. m
2026-03-29 14:14:38 +02:00
committed by GitHub
parent 65597fd6b5
commit 7f00a16d6d
2 changed files with 5 additions and 5 deletions

View File

@@ -268,7 +268,7 @@
background-color: var(--zen-urlbar-background-transparent, var(--zen-urlbar-background-base)) !important;
box-shadow: 0 30px 140px -15px light-dark(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)) !important;
backdrop-filter: none !important;
outline: 0.5px solid light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2)) !important;
outline: 0.5px solid light-dark(rgba(0, 0, 0, 0.3), rgba(255, 255, 255, 0.2)) !important;
outline-offset: var(--zen-urlbar-outline-offset) !important;
/* stylelint-disable-next-line media-query-no-invalid */

View File

@@ -590,7 +590,7 @@ window.gZenCompactModeManager = {
if (!toggle) {
return;
}
toggle.setAttribute("checked", this.preference);
toggle.toggleAttribute("checked", this.preference);
const hideTabBar = this.canHideSidebar;
const hideToolbar = this.canHideToolbar;
@@ -600,9 +600,9 @@ window.gZenCompactModeManager = {
const sidebarItem = document.getElementById(idName + "sidebar");
const toolbarItem = document.getElementById(idName + "toolbar");
const bothItem = document.getElementById(idName + "both");
sidebarItem.setAttribute("checked", !hideBoth && hideTabBar);
toolbarItem.setAttribute("checked", !hideBoth && hideToolbar);
bothItem.setAttribute("checked", hideBoth);
sidebarItem.toggleAttribute("checked", !hideBoth && hideTabBar);
toolbarItem.toggleAttribute("checked", !hideBoth && hideToolbar);
bothItem.toggleAttribute("checked", hideBoth);
},
_removeOpenStateOnUnifiedExtensions() {