feat: Make sure XUL store persists compact mode after change, b=(no-bug), c=compact-mode

This commit is contained in:
mr. m
2025-05-30 19:02:04 +02:00
parent e0bf7d011b
commit c7333caf7d
2 changed files with 6 additions and 0 deletions

View File

@@ -91,6 +91,10 @@ var gZenCompactModeManager = {
this.preference === value ||
document.documentElement.hasAttribute('zen-compact-animating')
) {
if (typeof this._wasInCompactMode !== 'undefined') {
// We wont do anything with it anyway, so we remove it
delete this._wasInCompactMode;
}
// We dont want the user to be able to spam the button
return value;
}
@@ -99,6 +103,7 @@ var gZenCompactModeManager = {
// main-window can't store attributes other than window sizes, so we use this instead
lazyCompactMode.mainAppWrapper.setAttribute('zen-compact-mode', value);
document.documentElement.setAttribute('zen-compact-mode', value);
Services.xulStore.persist(lazyCompactMode.mainAppWrapper, 'zen-compact-mode');
this._updateEvent();
return value;
},

View File

@@ -152,6 +152,7 @@
border-radius: calc(var(--zen-native-inner-radius) + var(--zen-element-separation) / 4);
@media -moz-pref('zen.view.compact.color-sidebar') {
background: var(--zen-main-browser-background-toolbar) !important;
background-attachment: fixed !important;
background-size: 2000px !important;
@media -moz-pref('zen.theme.acrylic-elements') {
backdrop-filter: blur(42px) saturate(110%) brightness(0.25) contrast(100%) !important;