refactor: Remove color settings on look and feel as they are no longer used, b=no-bug, c=common, workspaces

This commit is contained in:
Mr. M
2025-06-08 12:42:06 +02:00
parent 8fce658dc1
commit fd8a55c57c
19 changed files with 9 additions and 255 deletions

View File

@@ -20,4 +20,3 @@ pref('zen.theme.acrylic-elements', false);
pref('zen.theme.acrylic-elements', false);
#endif
pref('zen.theme.color-prefs.use-workspace-colors', true);

View File

@@ -1,16 +1,8 @@
diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml
index c64980810570fcea84e33fdc2d66ac42a79f4e46..6ef9bf4b88f0a0539d833f662c4dd890fd1fde93 100644
index c64980810570fcea84e33fdc2d66ac42a79f4e46..11fe00e84dbac781b3da90abb1251c70bd3b094a 100644
--- a/browser/base/content/aboutDialog.xhtml
+++ b/browser/base/content/aboutDialog.xhtml
@@ -35,6 +35,7 @@
<html:link rel="localization" href="branding/brand.ftl"/>
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
</linkset>
<html:div id="aboutDialogContainer">
@@ -102,10 +103,6 @@
@@ -102,10 +102,6 @@
<label id="version" class="update"/>
<label id="releasenotes" is="text-link" hidden="true" data-l10n-id="releaseNotes-link"/>
</hbox>
@@ -21,7 +13,7 @@ index c64980810570fcea84e33fdc2d66ac42a79f4e46..6ef9bf4b88f0a0539d833f662c4dd890
</vbox>
#endif
</hbox>
@@ -125,21 +122,17 @@
@@ -125,21 +121,17 @@
</description>
</vbox>
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2">

View File

@@ -1,12 +0,0 @@
diff --git a/browser/base/content/aboutRestartRequired.xhtml b/browser/base/content/aboutRestartRequired.xhtml
index c1f42b4ddd3b154a8643fc5265c556904805bdff..9722e7de76b02077addfeda90a9acd8b921a9cd6 100644
--- a/browser/base/content/aboutRestartRequired.xhtml
+++ b/browser/base/content/aboutRestartRequired.xhtml
@@ -29,6 +29,7 @@
/>
<link rel="localization" href="branding/brand.ftl" />
<link rel="localization" href="browser/aboutRestartRequired.ftl" />
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
</head>
<body>
<!-- PAGE CONTAINER (for styling purposes only) -->

View File

@@ -633,24 +633,9 @@ const kZenExtendedSidebar = 'zen.view.sidebar-expanded';
const kZenSingleToolbar = 'zen.view.use-single-toolbar';
var gZenLooksAndFeel = {
kZenColors: [
'#aac7ff',
'#74d7cb',
'#a0d490',
'#dec663',
'#ffb787',
'#dec1b1',
'#ffb1c0',
'#ddbfc3',
'#f6b0ea',
'#d4bbff',
],
init() {
if (this.__hasInitialized) return;
this.__hasInitialized = true;
this._initializeColorPicker(this._getInitialAccentColor());
window.zenPageAccentColorChanged = this._handleAccentColorChange.bind(this);
gZenMarketplaceManager.init();
for (const pref of [kZenExtendedSidebar, kZenSingleToolbar]) {
Services.prefs.addObserver(pref, this);
@@ -743,37 +728,6 @@ var gZenLooksAndFeel = {
});
}
},
_initializeColorPicker(accentColor) {
let elem = document.getElementById('zenLooksAndFeelColorOptions');
elem.innerHTML = '';
for (let color of this.kZenColors) {
let colorElemParen = document.createElement('div');
let colorElem = document.createElement('div');
colorElemParen.classList.add('zenLooksAndFeelColorOptionParen');
colorElem.classList.add('zenLooksAndFeelColorOption');
colorElem.style.setProperty('--zen-primary-color', color, 'important');
if (accentColor === color) {
colorElemParen.setAttribute('selected', 'true');
}
colorElemParen.addEventListener('click', () => {
Services.prefs.setBoolPref('zen.theme.color-prefs.use-workspace-colors', false);
Services.prefs.setStringPref('zen.theme.accent-color', color);
});
colorElemParen.appendChild(colorElem);
elem.appendChild(colorElemParen);
}
// TODO: add custom color selection!
},
_handleAccentColorChange(accentColor) {
this._initializeColorPicker(accentColor);
},
_getInitialAccentColor() {
return Services.prefs.getStringPref('zen.theme.accent-color', this.kZenColors[0]);
},
};
var gZenWorkspacesSettings = {
@@ -1183,11 +1137,6 @@ Preferences.addAll([
type: 'bool',
default: true,
},
{
id: 'zen.theme.color-prefs.use-workspace-colors',
type: 'bool',
default: false,
},
{
id: 'zen.view.compact.color-toolbar',
type: 'bool',

View File

@@ -39,35 +39,9 @@
data-l10n-id="zen-vertical-tabs-newtab-top-button-up"
preference="zen.view.show-newtab-button-top"/>
</vbox>
</groupbox>
<hbox id="zenLooksCategory"
class="subcategory"
hidden="true"
data-category="paneZenLooks">
<html:h1 data-l10n-id="pane-zen-looks-title"/>
</hbox>
<groupbox id="zenLooksAndFeelGroup" data-category="paneZenLooks" hidden="true" class="highlighting-group">
<label><html:h2 data-l10n-id="zen-look-and-feel-colors-header"/></label>
<description class="description-deemphasized" data-l10n-id="zen-look-and-feel-colors-description" />
<hbox id="zenLooksAndFeelColorOptions" align="center">
</hbox>
<html:div id="zen-theme-builder-wrapper"></html:div>
<box class="indent">
<checkbox id="zenLooksAndFeelUseWorkspaceColors"
data-l10n-id="zen-look-and-feel-use-workspace-colors"
preference="zen.theme.color-prefs.use-workspace-colors"/>
</box>
<hbox id="zenLooksAndFeelGradientPickerParent"></hbox>
<html:div data-l10n-id="preferences-web-appearance-footer">
<html:a id="web-appearance-manage-themes-link" class="text-link" data-l10n-name="themes-link" href="about:addons" target="_blank" />
</html:div>
<html:div data-l10n-id="preferences-web-appearance-footer">
<html:a id="web-appearance-manage-themes-link" class="text-link" data-l10n-name="themes-link" href="about:addons" target="_blank" />
</html:div>
</groupbox>
<hbox id="zenThemeCategory"

View File

@@ -1,12 +0,0 @@
diff --git a/browser/components/sessionstore/content/aboutSessionRestore.xhtml b/browser/components/sessionstore/content/aboutSessionRestore.xhtml
index 05538be5d95492903e44076dc43e195cbc76c10d..3c2ee6a9d44802657c9e0d5ef6c78e0b3920a9a5 100644
--- a/browser/components/sessionstore/content/aboutSessionRestore.xhtml
+++ b/browser/components/sessionstore/content/aboutSessionRestore.xhtml
@@ -20,6 +20,7 @@
<link rel="localization" href="browser/aboutSessionRestore.ftl"/>
<link rel="localization" href="branding/brand.ftl"/>
<script src="chrome://browser/content/aboutSessionRestore.js"/>
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
</head>
<body>

View File

@@ -162,8 +162,7 @@ groupbox h2 {
/* Look and feel */
#webAppearanceSettings,
#zen-theme-builder-wrapper + box {
#webAppearanceSettings {
margin-bottom: 15px;
}
@@ -203,31 +202,6 @@ groupbox h2 {
list-style-image: url('chrome://browser/skin/customize.svg');
}
#zenLooksAndFeelColorOptions {
display: grid;
grid-template-columns: repeat(auto-fill, 108px);
gap: 5px;
margin: 10px 0 15px 0;
}
.zenLooksAndFeelColorOptionParen {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 15px;
border-radius: 10px;
cursor: pointer;
background: var(--in-content-box-info-background);
width: fit-content;
margin-top: 10px;
border: 2px solid transparent;
}
.zenLooksAndFeelColorOptionParen[selected='true'] {
border-color: var(--zen-primary-color);
}
#zenLooksAndFeelGroup > html|div:last-of-type {
margin-top: 15px;
}