1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-07 23:00:01 +02:00

chore: Cleanup calls to updateSplitViewButton, b=(no-bug), c=split-view

This commit is contained in:
Mr. M 2025-05-27 13:02:28 +02:00
parent e48e7caef1
commit a6bc8d7105
No known key found for this signature in database
GPG key ID: 6292C4C8F8652B18
2 changed files with 0 additions and 22 deletions

View file

@ -993,7 +993,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
tab = tab.parentNode.closest('.tabbrowser-tab');
console.assert(tab, 'Tab not found for zen-glance-tab');
}
this.updateSplitViewButton(!tab?.splitView);
if (tab) {
this.updateSplitView(tab);
tab.linkedBrowser.docShellIsActive = true;
@ -1127,7 +1126,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
if (oldView === newView) return;
if (newView < 0 && oldView >= 0) {
this.updateSplitViewButton(true);
this.deactivateCurrentSplitView();
return;
}
@ -1147,7 +1145,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
}
this.removeSplitters();
this.tabBrowserPanel.removeAttribute('zen-split-view');
this.updateSplitViewButton(true);
this.currentView = -1;
this.toggleWrapperDisplay(false);
}
@ -1171,7 +1168,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
this.tabBrowserPanel.setAttribute('zen-split-view', 'true');
this.updateSplitViewButton(false);
this.applyGridToTabs(splitData.tabs);
this.applyGridLayout(splitData.layoutTree);
this.setTabsDocShellState(splitData.tabs, true);
@ -1498,20 +1494,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
container.style.inset = '';
}
/**
* Updates the split view button visibility.
*
* @param {boolean} hidden - Indicates if the button should be hidden.
*/
updateSplitViewButton(hidden) {
const button = document.getElementById('zen-split-views-box');
if (hidden) {
button?.setAttribute('hidden', 'true');
} else {
button?.removeAttribute('hidden');
}
}
/**
* Updates the UI of the panel.
*

View file

@ -112,10 +112,6 @@
cursor: ns-resize;
}
#zen-split-views-box:not([hidden='true']) {
display: flex !important;
}
.zen-view-splitter-header-container {
position: absolute;
top: calc(var(--zen-split-column-gap) / -2);