mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-10 00:55:30 +02:00
Refactor browser preferences and styles
This commit is contained in:
parent
aa74a68ca8
commit
0ca828325d
10 changed files with 29 additions and 22 deletions
|
@ -211,6 +211,8 @@ pref('image.jxl.enabled', true);
|
||||||
pref('browser.sessionstore.restore_pinned_tabs_on_demand', true);
|
pref('browser.sessionstore.restore_pinned_tabs_on_demand', true);
|
||||||
pref('browser.newtabpage.activity-stream.system.showWeather', true);
|
pref('browser.newtabpage.activity-stream.system.showWeather', true);
|
||||||
|
|
||||||
|
pref("browser.toolbars.bookmarks.visibility", "never");
|
||||||
|
|
||||||
// Enable experimental settings page (Usef for Zen Labs)
|
// Enable experimental settings page (Usef for Zen Labs)
|
||||||
pref('browser.preferences.experimental', true);
|
pref('browser.preferences.experimental', true);
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,14 @@ export var ZenCustomizableUI = new (class {
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
TYPE_TOOLBAR = 'toolbar';
|
TYPE_TOOLBAR = 'toolbar';
|
||||||
defaultSidebarIcons = ['zen-sidepanel-button', 'zen-workspaces-button', 'downloads-button'];
|
defaultSidebarIcons = ['zen-profile-button', 'zen-workspaces-button', 'downloads-button'];
|
||||||
|
|
||||||
startup(CustomizableUIInternal) {
|
startup(CustomizableUIInternal) {
|
||||||
CustomizableUIInternal.registerArea(
|
CustomizableUIInternal.registerArea(
|
||||||
'zen-sidebar-top-buttons',
|
'zen-sidebar-top-buttons',
|
||||||
{
|
{
|
||||||
type: this.TYPE_TOOLBAR,
|
type: this.TYPE_TOOLBAR,
|
||||||
defaultPlacements: ['preferences-button', 'zen-expand-sidebar-button', 'zen-profile-button'],
|
defaultPlacements: ['zen-sidepanel-button', 'preferences-button', 'zen-expand-sidebar-button'],
|
||||||
defaultCollapsed: null,
|
defaultCollapsed: null,
|
||||||
},
|
},
|
||||||
true
|
true
|
||||||
|
@ -61,6 +61,7 @@ export var ZenCustomizableUI = new (class {
|
||||||
<image id="zen-profile-button-icon" />
|
<image id="zen-profile-button-icon" />
|
||||||
</vbox>
|
</vbox>
|
||||||
</toolbarbutton>
|
</toolbarbutton>
|
||||||
|
<toolbarbutton removeable="true" class="toolbarbutton-1 zen-sidebar-action-button" id="zen-sidepanel-button" data-l10n-id="sidebar-zen-sidepanel" onclick="gZenBrowserManagerSidebar.toggle();"></toolbarbutton>
|
||||||
</hbox>
|
</hbox>
|
||||||
</toolbar>
|
</toolbar>
|
||||||
`);
|
`);
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove all styles except for the width, since we are xulstoring the complet style list
|
// remove all styles except for the width, since we are xulstoring the complet style list
|
||||||
const width = toolbox.style.width || '250px';
|
const width = toolbox.style.width || '270px';
|
||||||
toolbox.removeAttribute('style');
|
toolbox.removeAttribute('style');
|
||||||
toolbox.style.width = width;
|
toolbox.style.width = width;
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9d41110b8b181c9493540cc590c95b6f30d021f3
|
Subproject commit 2adc19bc21031dbb5806c38072128ce5318b47f6
|
|
@ -7,5 +7,4 @@
|
||||||
skipintoolbarset="true"
|
skipintoolbarset="true"
|
||||||
context="toolbar-context-menu"
|
context="toolbar-context-menu"
|
||||||
mode="icons">
|
mode="icons">
|
||||||
<toolbarbutton removeable="true" class="toolbarbutton-1 zen-sidebar-action-button" id="zen-sidepanel-button" data-l10n-id="sidebar-zen-sidepanel" onclick="gZenBrowserManagerSidebar.toggle();"></toolbarbutton>
|
|
||||||
</toolbar>
|
</toolbar>
|
|
@ -4,7 +4,8 @@
|
||||||
border-radius: var(--zen-webview-border-radius, var(--zen-border-radius));
|
border-radius: var(--zen-webview-border-radius, var(--zen-border-radius));
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.1), var(--zen-colors-border));
|
box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
|
||||||
|
border: 1px solid light-dark(transparent, rgba(255,255,255,.08));
|
||||||
|
|
||||||
& .browserContainer,
|
& .browserContainer,
|
||||||
#zen-glance-browser browser {
|
#zen-glance-browser browser {
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
border-bottom-left-radius: var(--zen-border-radius);
|
border-bottom-left-radius: var(--zen-border-radius);
|
||||||
border-bottom-right-radius: var(--zen-border-radius);
|
border-bottom-right-radius: var(--zen-border-radius);
|
||||||
transition: all 0.1s ease-in-out;
|
transition: all 0.1s ease-in-out;
|
||||||
width: calc(100% - ((var(--zen-element-separation) + var(--zen-compact-toolbar-offset)) * 2));
|
width: 100%;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
background: var(--zen-dialog-background);
|
background: var(--zen-dialog-background);
|
||||||
|
|
||||||
|
|
|
@ -16,14 +16,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#browser {
|
#browser {
|
||||||
--zen-toolbox-padding: 5px;
|
--zen-toolbox-padding: calc(var(--zen-element-separation) / 1.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
#vertical-pinned-tabs-container-separator {
|
#vertical-pinned-tabs-container-separator {
|
||||||
background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.075));
|
background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.18));
|
||||||
margin: var(--zen-toolbox-padding) 0;
|
margin: var(--zen-toolbox-padding) auto;
|
||||||
border: none;
|
border: none;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
|
width: 98%;
|
||||||
|
|
||||||
|
#vertical-pinned-tabs-container:not(:has(tab:not([hidden]))) + & {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox {
|
#navigator-toolbox {
|
||||||
|
@ -256,8 +261,6 @@
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
--toolbarbutton-inner-padding: var(--zen-toolbar-button-inner-padding) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mark: Fix separator paddings */
|
/* Mark: Fix separator paddings */
|
||||||
|
@ -373,7 +376,7 @@
|
||||||
--tab-min-width: 36px !important;
|
--tab-min-width: 36px !important;
|
||||||
|
|
||||||
/* Important: When changin this value, make sure expand on hover doesn't break! */
|
/* Important: When changin this value, make sure expand on hover doesn't break! */
|
||||||
--zen-toolbox-padding: 6px;
|
--zen-toolbox-padding: calc(var(--zen-element-separation) / 2 + 1px);
|
||||||
--zen-toolbox-max-width: calc(var(--tab-min-width) + var(--zen-toolbox-padding) * 2);
|
--zen-toolbox-max-width: calc(var(--tab-min-width) + var(--zen-toolbox-padding) * 2);
|
||||||
max-width: var(--zen-toolbox-max-width) !important;
|
max-width: var(--zen-toolbox-max-width) !important;
|
||||||
min-width: var(--zen-toolbox-max-width) !important;
|
min-width: var(--zen-toolbox-max-width) !important;
|
||||||
|
@ -415,7 +418,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
width: 60% !important;
|
width: 90% !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -718,17 +721,17 @@
|
||||||
--zen-colors-border: var(--zen-colors-tertiary);
|
--zen-colors-border: var(--zen-colors-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
margin-top: 10px;
|
margin-top: 11px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.075));
|
background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.18));
|
||||||
width: 96%;
|
width: 98%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -5px;
|
top: -7px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
|
@ -738,7 +741,6 @@
|
||||||
|
|
||||||
/* Mark: Essentials Toolbar */
|
/* Mark: Essentials Toolbar */
|
||||||
#EssentialsToolbar {
|
#EssentialsToolbar {
|
||||||
border-bottom: 1px solid light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.075));
|
|
||||||
padding-bottom: var(--zen-toolbox-padding);
|
padding-bottom: var(--zen-toolbox-padding);
|
||||||
margin-bottom: var(--zen-toolbox-padding);
|
margin-bottom: var(--zen-toolbox-padding);
|
||||||
& .bookmark-item {
|
& .bookmark-item {
|
||||||
|
@ -765,7 +767,7 @@
|
||||||
max-width: unset;
|
max-width: unset;
|
||||||
|
|
||||||
border-radius: var(--border-radius-medium);
|
border-radius: var(--border-radius-medium);
|
||||||
--zen-essential-tabs-bgcolor: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.12));
|
--zen-essential-tabs-bgcolor: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.18));
|
||||||
background: var(--tab-hover-background-color);
|
background: var(--tab-hover-background-color);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
--zen-button-padding: 0.6rem 1.2rem;
|
--zen-button-padding: 0.6rem 1.2rem;
|
||||||
|
|
||||||
/* Toolbar */
|
/* Toolbar */
|
||||||
--zen-toolbar-height: 39px;
|
--zen-toolbar-height: 41px;
|
||||||
--zen-toolbar-button-inner-padding: 6px;
|
--zen-toolbar-button-inner-padding: 6px;
|
||||||
--toolbarbutton-outer-padding: 4px;
|
--toolbarbutton-outer-padding: 4px;
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,12 @@
|
||||||
--toolbarbutton-hover-background: transparent !important;
|
--toolbarbutton-hover-background: transparent !important;
|
||||||
border-radius: var(--zen-button-border-radius) !important;
|
border-radius: var(--zen-button-border-radius) !important;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
padding: 5px;
|
padding: 2px;
|
||||||
appearance: unset !important;
|
appearance: unset !important;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
gap: 3px;
|
gap: 3px;
|
||||||
|
background: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.05));
|
||||||
|
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
& toolbarbutton {
|
& toolbarbutton {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue