mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
feat: Make sure XUL store persists compact mode after change, b=(no-bug), c=compact-mode
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user