fix: Fixed window caption buttons not having any padding, b=no-bug, c=common

This commit is contained in:
mr. m
2026-02-12 17:59:18 +01:00
parent 302e321da6
commit 6dce6d60e9
2 changed files with 20 additions and 19 deletions

View File

@@ -178,7 +178,7 @@
--tab-border-radius: 6px;
--toolbarbutton-border-radius: var(--tab-border-radius);
--toolbarbutton-inner-padding: 6px;
--toolbarbutton-outer-padding: 2px;
--toolbarbutton-outer-padding: 1px;
color: color-mix(in srgb, currentColor 60%, transparent);
transition:
@@ -194,10 +194,6 @@
}
}
#zen-sidebar-top-buttons toolbarbutton {
padding: 0;
}
.zen-interactive-button {
background: color-mix(in srgb, currentColor 6%, transparent) !important;
transition:

View File

@@ -1279,21 +1279,26 @@ class nsZenWindowSync {
for (let browser of aBrowsers) {
const tab = this.#swapedTabsEntriesForWC.get(browser.permanentKey);
if (tab) {
let win = tab.ownerGlobal;
this.log(`Finalizing swap for tab ${tab.id} on window close`);
lazy.TabStateCache.update(
tab.linkedBrowser.permanentKey,
lazy.TabStateCache.get(browser.permanentKey)
);
let tabData = this.#getTabEntriesFromCache(tab);
let activePageData = tabData.entries[tabData.index - 1] || null;
try {
let win = tab.ownerGlobal;
this.log(`Finalizing swap for tab ${tab.id} on window close`);
lazy.TabStateCache.update(
tab.linkedBrowser.permanentKey,
lazy.TabStateCache.get(browser.permanentKey)
);
let tabData = this.#getTabEntriesFromCache(tab);
let activePageData = tabData.entries[tabData.index - 1] || null;
// If the page has a title, set it. When doing a swap and we still didn't
// flush the tab state, the title might not be correct.
if (activePageData && win.gBrowser) {
win.gBrowser.setInitialTabTitle(tab, activePageData.title, {
isContentTitle: activePageData.title && activePageData.title != activePageData.url,
});
// If the page has a title, set it. When doing a swap and we still didn't
// flush the tab state, the title might not be correct.
if (activePageData && win?.gBrowser) {
win.gBrowser.setInitialTabTitle(tab, activePageData.title, {
isContentTitle: activePageData.title && activePageData.title != activePageData.url,
});
}
} catch (e) {
// We might have already closed the window at this point, so just ignore any error.
console.error(e);
}
}
}