Skip to content

Commit

Permalink
Refactor Zen Compact Mode styles and preference handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mauro-balades committed Jan 6, 2025
1 parent 3e34d12 commit 88548ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/browser/base/content/zen-styles/zen-compact-mode.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
#navigator-toolbox[movingtab],
#navigator-toolbox:has(.tabbrowser-tab:active),
#navigator-toolbox:has(
*:is([panelopen='true'], [open='true'], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore)
*:is([panelopen='true'], [open], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore)
) {
&:not([animate='true']) {
transition:
Expand Down
10 changes: 1 addition & 9 deletions src/browser/base/zen-components/ZenCompactMode.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ var gZenCompactModeManager = {
_removeHoverFrames: {},

init() {
XPCOMUtils.defineLazyPreferenceGetter(
lazyCompactMode,
'COMPACT_MODE_ENABLED',
'zen.view.compact',
true,
this._updateEvent.bind(this)
);

Services.prefs.addObserver('zen.view.sidebar-expanded.on-hover', this._disableTabsOnHoverIfConflict.bind(this));
Services.prefs.addObserver('zen.tabs.vertical.right-side', this._updateSidebarIsOnRight.bind(this));

Expand All @@ -41,7 +33,7 @@ var gZenCompactModeManager = {
},

get prefefence() {
return lazyCompactMode.COMPACT_MODE_ENABLED;
return Services.prefs.getBoolPref('zen.view.compact');
},

set preference(value) {
Expand Down

0 comments on commit 88548ed

Please sign in to comment.