diff --git a/src/zen/glance/ZenGlanceManager.mjs b/src/zen/glance/ZenGlanceManager.mjs index 6895a91b2..d17ab336d 100644 --- a/src/zen/glance/ZenGlanceManager.mjs +++ b/src/zen/glance/ZenGlanceManager.mjs @@ -259,11 +259,9 @@ } } - const browserSidebarContainer = this.#currentParentTab?.linkedBrowser?.closest( - '.browserSidebarContainer' - ); - if (onTabClose && hasFocused && !this.#confirmationTimeout && browserSidebarContainer) { - const cancelButton = browserSidebarContainer?.querySelector('.zen-glance-sidebar-close'); + const sidebarButtons = this.browserWrapper.querySelector('.zen-glance-sidebar-container'); + if (onTabClose && hasFocused && !this.#confirmationTimeout && sidebarButtons) { + const cancelButton = sidebarButtons?.querySelector('.zen-glance-sidebar-close'); cancelButton.setAttribute('waitconfirmation', true); this.#confirmationTimeout = setTimeout(() => { cancelButton.removeAttribute('waitconfirmation'); @@ -274,7 +272,9 @@ this.browserWrapper.removeAttribute('has-finished-animation'); if (noAnimation) { - this._clearContainerStyles(browserSidebarContainer); + this._clearContainerStyles( + this.#currentParentTab?.linkedBrowser?.closest('.browserSidebarContainer') + ); this.quickCloseGlance({ closeCurrentTab: false }); return; } @@ -299,7 +299,6 @@ this.overlay.style.pointerEvents = 'none'; this.quickCloseGlance({ justAnimateParent: true, clearID: false }); const originalPosition = this.#glances.get(this.#currentGlanceID).originalPosition; - const sidebarButtons = this.browserWrapper.querySelector('.zen-glance-sidebar-container'); if (sidebarButtons) { gZenUIManager.motion .animate( diff --git a/src/zen/workspaces/ZenGradientGenerator.mjs b/src/zen/workspaces/ZenGradientGenerator.mjs index c40f5f0ba..0fce7fcee 100644 --- a/src/zen/workspaces/ZenGradientGenerator.mjs +++ b/src/zen/workspaces/ZenGradientGenerator.mjs @@ -1268,7 +1268,8 @@ getMostDominantColor(allColors) { const color = this.getPrimaryColor(allColors); if (typeof color === 'string') { - return this.hexToRgb(color); + // We found a custom color, we should rather return the native accent color + return this.getNativeAccentColor(); } return color; } @@ -1448,15 +1449,14 @@ browser.document.documentElement.style.setProperty('--zen-primary-color', primaryColor); browser.gZenThemePicker.isLegacyVersion = this.isLegacyVersion; let isDarkMode = isDarkModeWindow; - const isUsingCustomColors = workspaceTheme.gradientColors.some((color) => color.isCustom); - if (!isDefaultTheme && !this.isLegacyVersion && !isUsingCustomColors) { + if (!isDefaultTheme && !this.isLegacyVersion) { // Check for the primary color isDarkMode = browser.gZenThemePicker.shouldBeDarkMode(dominantColor); browser.document.documentElement.setAttribute('zen-should-be-dark-mode', isDarkMode); browser.gZenThemePicker.panel.removeAttribute('invalidate-controls'); } else { browser.document.documentElement.removeAttribute('zen-should-be-dark-mode'); - if (!this.isLegacyVersion && !isUsingCustomColors) { + if (!this.isLegacyVersion) { browser.gZenThemePicker.panel.setAttribute('invalidate-controls', 'true'); } } diff --git a/surfer.json b/surfer.json index f038adcd0..79c0353ba 100644 --- a/surfer.json +++ b/surfer.json @@ -19,7 +19,7 @@ "brandShortName": "Zen", "brandFullName": "Zen Browser", "release": { - "displayVersion": "1.14.7b", + "displayVersion": "1.14.8b", "github": { "repo": "zen-browser/desktop" },