feat: Fix bootstraping and other small nitpicks, b=no-bug, c=common, tabs, workspaces

This commit is contained in:
mr. m
2025-10-11 17:02:38 +02:00
parent b6f00f6f57
commit 78bba35f34
11 changed files with 49 additions and 101 deletions

View File

@@ -1513,8 +1513,16 @@
}
getNativeAccentColor() {
const accentColor = Services.prefs.getStringPref('zen.theme.accent-color');
const rgb = this.hexToRgb(accentColor);
let accentColor = Services.prefs.getStringPref('zen.theme.accent-color');
let rgb;
if (accentColor === 'AccentColor') {
const rawRgb = window.getComputedStyle(document.getElementById('zen-browser-background'))[
'color'
];
rgb = rawRgb.match(/\d+/g).map(Number);
} else {
rgb = this.hexToRgb(accentColor);
}
if (this.isDarkMode) {
// If the theme is dark, we want to use a lighter color
return this.blendColors(rgb, [0, 0, 0], 40);

View File

@@ -950,8 +950,6 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
window.addEventListener('TabSelect', this.onLocationChange.bind(this));
window.addEventListener('TabBrowserInserted', this.onTabBrowserInserted.bind(this));
await this.selectStartPage();
}
async selectStartPage() {