mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
chore: Update sidebar-expanded max-width preference and UI styling
This commit is contained in:
@@ -69,6 +69,7 @@ pref('zen.view.compact', false);
|
||||
pref('zen.view.compact.hide-toolbar', false);
|
||||
pref('zen.view.sidebar-expanded', false);
|
||||
pref('zen.view.sidebar-expanded.show-button', true);
|
||||
pref('zen.view.sidebar-expanded.max-width', 400);
|
||||
|
||||
// Pref to enable the new profiles (TODO: Check this out!)
|
||||
//pref("browser.profiles.enabled", true);
|
||||
|
@@ -26,9 +26,26 @@ var gZenUIManager = {
|
||||
var gZenVerticalTabsManager = {
|
||||
init() {
|
||||
//Services.prefs.addObserver('zen.view.compact', this._updateEvent.bind(this));
|
||||
//Services.prefs.addObserver('zen.view.sidebar-expanded', this._updateEvent.bind(this));
|
||||
Services.prefs.addObserver('zen.view.sidebar-expanded', this._updateEvent.bind(this));
|
||||
Services.prefs.addObserver('zen.view.sidebar-expanded.max-width', this._updateEvent.bind(this));
|
||||
this._updateMaxWidth();
|
||||
},
|
||||
|
||||
_updateEvent() {
|
||||
this._updateMaxWidth();
|
||||
},
|
||||
|
||||
_updateMaxWidth() {
|
||||
let isCompactMode = Services.prefs.getBoolPref('zen.view.compact');
|
||||
let expanded = this.expanded;
|
||||
let maxWidth = Services.prefs.getIntPref('zen.view.sidebar-expanded.max-width');
|
||||
let toolbox = document.getElementById('navigator-toolbox');
|
||||
if (expanded && !isCompactMode) {
|
||||
toolbox.style.maxWidth = `${maxWidth}px`;
|
||||
} else {
|
||||
toolbox.style.removeProperty('maxWidth');
|
||||
}
|
||||
},
|
||||
|
||||
get expanded() {
|
||||
return Services.prefs.getBoolPref('zen.view.sidebar-expanded');
|
||||
|
@@ -222,7 +222,10 @@ button.popup-notification-dropmarker {
|
||||
#navigator-toolbox {
|
||||
min-width: 55px;
|
||||
max-width: 55px;
|
||||
transition: .4s !important;
|
||||
}
|
||||
|
||||
#zen-tabbox-wrapper:has(#zen-sidebar-splitter:not([state="dragging"])) #navigator-toolbox {
|
||||
transition: .3s !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox toolbar#TabsToolbar {
|
||||
@@ -764,6 +767,8 @@ panelmultiview {
|
||||
}
|
||||
|
||||
.tabbrowser-tab {
|
||||
max-width: unset !important;
|
||||
|
||||
&:not([pinned]) {
|
||||
width: 100%;
|
||||
|
||||
@@ -819,8 +824,7 @@ panelmultiview {
|
||||
|
||||
#zen-workspaces-button {
|
||||
width: -moz-available !important;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
#zen-sidebar-icons-wrapper {
|
||||
|
Reference in New Issue
Block a user