Skip to content

Commit

Permalink
chore: followup bug 1899598 - Hide the horizontal tab strip when vert…
Browse files Browse the repository at this point in the history
…ical tabs are enabled
  • Loading branch information
onemen committed Oct 3, 2024
1 parent 7f59b96 commit 1fa0ae5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
7 changes: 6 additions & 1 deletion addon/chrome/content/minit/tablib.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,12 @@ Tabmix.tablib = {
${Tabmix.isVersion(1020) ? "gBrowser.visibleTabs.length == 1" : "Tabmix.tabsUtils.getTabsCount() == 1"}) {
collapse = !window.toolbar.visible || TabmixTabbar.hideMode === 1;
}
$&`
$&`,
{check: !Tabmix.isVersion(1330)}
)._replace(
'if (nonPopupWithVerticalTabs) {',
'if (nonPopupWithVerticalTabs || TabmixTabbar.hideMode === 2) {',
{check: Tabmix.isVersion(133)}
)._replace(
/(})(\)?)$/,
`const bottomToolbox = document.getElementById("tabmix-bottom-toolbox");
Expand Down
11 changes: 10 additions & 1 deletion addon/chrome/content/preferences/appearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,23 @@ var gAppearancePane = {
description.innerHTML = "These preferences are not in use for vertical tabs.";
description.style.width = "25em";
}
Tabmix.setItem("tabBarDisplay", "tstInstalled", true);
const tabBarDisplay = $("tabBarDisplay");
Tabmix.setItem(tabBarDisplay, "tstInstalled", true);
Tabmix.setItem("tabBarPosition", "disabled", true);
Tabmix.setItem("tabsScroll", "disabled", true);
Tabmix.setItem("maxrow", "disabled", true);
Tabmix.setItem("pinnedTabScroll", "disabled", true);
Tabmix.setItem("offsetAmountToScroll", "disabled", true);
Tabmix.setItem("scrollDelay", "disabled", true);
Tabmix.setItem("smoothScroll", "disabled", true);

if (Tabmix.isVersion(1330)) {
const hideTabbar = $("hideTabbar");
Tabmix.setItem(hideTabbar, "disabled", true);
Tabmix.setItem(hideTabbar.previousElementSibling, "disabled", true);
Tabmix.setItem("show-hideTabbar-context-menu", "disabled", true);
tabBarDisplay.insertBefore(description, tabBarDisplay.firstChild);
}
}

if (
Expand Down
2 changes: 1 addition & 1 deletion types/general.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ interface StatusPanel {
}

interface TabBarVisibility {
update: () => void;
update: (force?: boolean) => void;
}

interface XULBrowserWindow {
Expand Down

0 comments on commit 1fa0ae5

Please sign in to comment.