mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-24 21:56:10 +00:00
feat: Limit the amount of displayed moving tabs we show, b=no-bug, c=common, tabs
This commit is contained in:
@@ -142,7 +142,7 @@
|
||||
|
||||
--zen-toolbar-element-bg: light-dark(
|
||||
color-mix(in oklch, var(--toolbox-textcolor) 10%, transparent),
|
||||
color-mix(in oklch, var(--toolbox-textcolor) 12.5%, transparent)
|
||||
color-mix(in oklch, var(--toolbox-textcolor) 15%, transparent)
|
||||
);
|
||||
|
||||
--zen-toolbar-element-bg-hover: light-dark(
|
||||
|
||||
@@ -129,12 +129,13 @@
|
||||
);
|
||||
const tabRect = window.windowUtils.getBoundsWithoutFlushing(movingTabs[0]);
|
||||
const wrapper = document.createElement("div");
|
||||
let movingTabsCount = Math.min(movingTabs.length, 3);
|
||||
wrapper.style.width = tabRect.width + "px";
|
||||
wrapper.style.height = tabRect.height * movingTabs.length + "px";
|
||||
wrapper.style.height = tabRect.height * movingTabsCount + "px";
|
||||
wrapper.style.position = "fixed";
|
||||
wrapper.style.top = "-9999px";
|
||||
periphery.appendChild(wrapper);
|
||||
for (let i = 0; i < movingTabs.length; i++) {
|
||||
for (let i = 0; i < movingTabsCount; i++) {
|
||||
const tab = movingTabs[i];
|
||||
const tabClone = tab.cloneNode(true);
|
||||
if (tab.hasAttribute("zen-essential")) {
|
||||
@@ -149,6 +150,7 @@
|
||||
// for the tab to be more visible. This is a hacky workaround.
|
||||
// TODO: Make windows and linux DnD use nsZenDragAndDrop::mDragImageOpacity
|
||||
tabClone.style.colorScheme = "light";
|
||||
tabClone.style.color = "black";
|
||||
}
|
||||
if (i > 0) {
|
||||
tabClone.style.transform = `translate(${i * 4}px, -${i * (tabRect.height - 4)}px)`;
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
border-bottom: 0px solid transparent !important;
|
||||
|
||||
--tab-block-margin: 2px;
|
||||
--tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.12));
|
||||
--tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.18));
|
||||
--tab-selected-shadow: 0 1px 1px 1px light-dark(rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.05)) !important;
|
||||
grid-gap: 0 !important;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user