Added theme color deduction for workspace gradients and fixed macos titlebar buttons display

This commit is contained in:
mr. M
2024-10-29 20:45:38 +01:00
parent 1a906b746e
commit a08df8f9ef
9 changed files with 28 additions and 23 deletions

2
l10n

Submodule l10n updated: 6c55a61676...fc563c5294

View File

@@ -79,12 +79,12 @@ pref('zen.tabs.show-newtab-under', false);
pref('zen.theme.accent-color', "#aac7ff"); pref('zen.theme.accent-color', "#aac7ff");
pref('zen.theme.border-radius', 8); // In pixels pref('zen.theme.border-radius', 8); // In pixels
pref('zen.theme.content-element-separation', 6); // In pixels pref('zen.theme.content-element-separation', 6); // In pixels
pref('zen.theme.toolbar-themed', true);
pref('zen.theme.pill-button', false); pref('zen.theme.pill-button', false);
pref('zen.theme.gradient', true); pref('zen.theme.gradient', true);
pref('zen.view.compact', false); pref('zen.view.compact', false);
pref('zen.view.experimental-rounded-view', true); pref('zen.view.experimental-rounded-view', true);
pref('zen.theme.color-prefs.use-workspace-colors', true);
pref('zen.theme.color-prefs.amoled', false); pref('zen.theme.color-prefs.amoled', false);
pref('zen.theme.color-prefs.colorful', false); pref('zen.theme.color-prefs.colorful', false);

View File

@@ -82,3 +82,9 @@
.titlebar-buttonbox-container { .titlebar-buttonbox-container {
height: 100%; height: 100%;
} }
@media (-moz-platform: macos) {
.titlebar-buttonbox-container {
margin-inline-end: 8px;
}
}

View File

@@ -98,7 +98,7 @@
& .tabbrowser-tab { & .tabbrowser-tab {
animation: zen-slide-in 0.2s ease-in-out; animation: zen-slide-in 0.2s ease-in-out;
max-width: unset !important; max-width: unset;
padding: 0 !important; padding: 0 !important;
position: relative; position: relative;
@@ -406,6 +406,10 @@
transform: translateX(-50%); transform: translateX(-50%);
position: absolute; position: absolute;
} }
& .tabbrowser-tab {
max-width: var(--tab-min-width);
}
} }
& #TabsToolbar-customization-target { & #TabsToolbar-customization-target {
@@ -417,7 +421,7 @@
} }
& #tabbrowser-tabs { & #tabbrowser-tabs {
margin-top: -3px; margin-top: -2px;
--tab-min-width: 36px !important; --tab-min-width: 36px !important;
& .tabbrowser-tab { & .tabbrowser-tab {
@@ -427,6 +431,8 @@
margin-inline: auto !important; margin-inline: auto !important;
&:is([selected], [multiselected]) { &:is([selected], [multiselected]) {
box-shadow: 0 0 1px 1px rgba(0,0,0,.1);
@media not (prefers-color-scheme: dark) { @media not (prefers-color-scheme: dark) {
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.12) !important; box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.12) !important;
} }
@@ -571,7 +577,6 @@
position: absolute; position: absolute;
padding: var(--zen-toolbox-padding); padding: var(--zen-toolbox-padding);
padding-top: 0;
transition: 0 !important; transition: 0 !important;
/*animation: zen-vtabs-animation 0.3s ease-in-out;*/ /*animation: zen-vtabs-animation 0.3s ease-in-out;*/
-moz-window-dragging: no-drag; -moz-window-dragging: no-drag;

View File

@@ -183,10 +183,3 @@
} }
} }
} }
@media not (-moz-bool-pref: 'zen.theme.toolbar-themed') {
:root {
--toolbar-bgcolor: light-dark(#e6e6e6, #1b1b1b) !important;
--zen-themed-toolbar-bg: var(--toolbar-bgcolor);
}
}

View File

@@ -36,7 +36,7 @@
} }
#urlbar:not([focused='true']):not([breakout-extend="true"]) > #urlbar-background { #urlbar:not([focused='true']):not([breakout-extend="true"]) > #urlbar-background {
background: color-mix(in srgb, light-dark(#fff, var(--zen-colors-secondary)) 50%, transparent 50%) !important; background: color-mix(in srgb, light-dark(#fff, var(--zen-colors-tertiary)) 60%, transparent 40%) !important;
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
} }

View File

@@ -645,6 +645,7 @@ var gZenLooksAndFeel = {
colorElemParen.setAttribute('selected', 'true'); colorElemParen.setAttribute('selected', 'true');
} }
colorElemParen.addEventListener('click', () => { colorElemParen.addEventListener('click', () => {
Services.prefs.setBoolPref('zen.theme.color-prefs.use-workspace-colors', false);
Services.prefs.setStringPref('zen.theme.accent-color', color); Services.prefs.setStringPref('zen.theme.accent-color', color);
}); });
colorElemParen.appendChild(colorElem); colorElemParen.appendChild(colorElem);
@@ -967,11 +968,6 @@ var gZenCKSSettings = {
}; };
Preferences.addAll([ Preferences.addAll([
{
id: 'zen.theme.toolbar-themed',
type: 'bool',
default: true,
},
{ {
id: 'zen.sidebar.enabled', id: 'zen.sidebar.enabled',
type: 'bool', type: 'bool',
@@ -1086,5 +1082,10 @@ Preferences.addAll([
id: "zen.glance.enabled", id: "zen.glance.enabled",
type: "bool", type: "bool",
default: true, default: true,
} },
{
id: "zen.theme.color-prefs.use-workspace-colors",
type: "bool",
default: false,
},
]); ]);

View File

@@ -18,9 +18,9 @@
<html:div id="zen-theme-builder-wrapper"></html:div> <html:div id="zen-theme-builder-wrapper"></html:div>
<box class="indent"> <box class="indent">
<checkbox id="zenLooksAndFeelUseThemedToolbar" <checkbox id="zenLooksAndFeelUseWorkspaceColors"
data-l10n-id="zen-look-and-feel-themed-toolbar" data-l10n-id="zen-look-and-feel-use-workspace-colors"
preference="zen.theme.toolbar-themed"/> preference="zen.theme.color-prefs.use-workspace-colors"/>
</box> </box>
<hbox id="zenLooksAndFeelGradientPickerParent"></hbox> <hbox id="zenLooksAndFeelGradientPickerParent"></hbox>