mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-03 08:28:38 +00:00
Refactor sidebar scrolling logic and improve tab height calculations for better UI performance
This commit is contained in:
@@ -26,7 +26,7 @@ var gZenUIManager = {
|
||||
|
||||
updateTabsToolbar() {
|
||||
// Set tabs max-height to the "toolbar-items" height
|
||||
const tabs = document.getElementById('tabbrowser-tabs');
|
||||
const tabs = document.getElementById('zen-browser-tabs-wrapper');
|
||||
// Remove tabs so we can accurately calculate the height
|
||||
// without them affecting the height of the toolbar
|
||||
for (const tab of gBrowser.tabs) {
|
||||
@@ -42,10 +42,9 @@ var gZenUIManager = {
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
continue;
|
||||
}
|
||||
tab.style.maxHeight = height + 'px';
|
||||
tab.style.removeProperty('max-height');
|
||||
}
|
||||
tabs.style.maxHeight = height + 'px';
|
||||
//console.info('ZenThemeModifier: set tabs max-height to', totalHeight + 'px');
|
||||
},
|
||||
|
||||
openAndChangeToTab(url, options) {
|
||||
|
Reference in New Issue
Block a user