mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-30 06:58:41 +00:00
Refactor zen-components and zen-styles/zen-tabs/vertical-tabs.css
This commit is contained in:
Submodule src/browser/base/content/zen-components updated: 8fce947f5f...9d41110b8b
@@ -184,7 +184,7 @@
|
|||||||
display: flex !important;
|
display: flex !important;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
&:not(:hover) .tab-background:not([selected]):not([multiselected]) {
|
& .tabbrowser-tab:not(:hover) .tab-background:not([selected]):not([multiselected]) {
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,25 +194,6 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
& .tab-label-container {
|
|
||||||
display: flex !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
& .tab-throbber,
|
|
||||||
& .tab-icon-pending,
|
|
||||||
& .tab-icon-image,
|
|
||||||
& .tab-sharing-icon-overlay,
|
|
||||||
& .tab-icon-overlay {
|
|
||||||
margin-inline-end: var(--toolbarbutton-inner-padding) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabbrowser-tab:is(:hover, [visuallyselected], [selected]) {
|
|
||||||
& .tab-close-button {
|
|
||||||
display: block;
|
|
||||||
--tab-inline-padding: 0; /* Avoid weird padding */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabbrowser-tab[zen-glance-tab='true'] {
|
.tabbrowser-tab[zen-glance-tab='true'] {
|
||||||
width: fit-content !important;
|
width: fit-content !important;
|
||||||
}
|
}
|
||||||
@@ -340,7 +321,7 @@
|
|||||||
--tab-inline-padding: 8px;
|
--tab-inline-padding: 8px;
|
||||||
& .tabbrowser-tab {
|
& .tabbrowser-tab {
|
||||||
|
|
||||||
&:not([pinned]) .tab-label-container {
|
& .tab-label-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -354,7 +335,7 @@
|
|||||||
width: -moz-available;
|
width: -moz-available;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not([pinned]):is(:hover, [visuallyselected]) .tab-close-button {
|
&:is(:hover, [visuallyselected]) .tab-close-button {
|
||||||
display: block;
|
display: block;
|
||||||
--tab-inline-padding: 0; /* Avoid weird padding */
|
--tab-inline-padding: 0; /* Avoid weird padding */
|
||||||
}
|
}
|
||||||
@@ -364,13 +345,11 @@
|
|||||||
.tab-icon-image,
|
.tab-icon-image,
|
||||||
.tab-sharing-icon-overlay,
|
.tab-sharing-icon-overlay,
|
||||||
.tab-icon-overlay {
|
.tab-icon-overlay {
|
||||||
&:not([pinned]) {
|
|
||||||
margin-inline-end: var(--toolbarbutton-inner-padding) !important;
|
margin-inline-end: var(--toolbarbutton-inner-padding) !important;
|
||||||
margin-inline-start: calc(var(--toolbarbutton-inner-padding) / 4) !important;
|
margin-inline-start: calc(var(--toolbarbutton-inner-padding) / 4) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@media (-moz-bool-pref: 'zen.view.compact') and (-moz-bool-pref: 'zen.view.compact.hide-toolbar') and (not (-moz-bool-pref: 'zen.view.compact.hide-tabbar')) {
|
@media (-moz-bool-pref: 'zen.view.compact') and (-moz-bool-pref: 'zen.view.compact.hide-toolbar') and (not (-moz-bool-pref: 'zen.view.compact.hide-tabbar')) {
|
||||||
& {
|
& {
|
||||||
|
@@ -1,12 +1,13 @@
|
|||||||
diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs
|
diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs
|
||||||
index 26f5671c849d9b0a126d79b07bc7d3d7870826ec..21d63856a06cd46424e1c1a3697b2f3d225d5c08 100644
|
index 26f5671c849d9b0a126d79b07bc7d3d7870826ec..366e3693001eb1c2fce0443f1dd196cccd3ed846 100644
|
||||||
--- a/browser/components/sessionstore/TabState.sys.mjs
|
--- a/browser/components/sessionstore/TabState.sys.mjs
|
||||||
+++ b/browser/components/sessionstore/TabState.sys.mjs
|
+++ b/browser/components/sessionstore/TabState.sys.mjs
|
||||||
@@ -98,6 +98,11 @@ var TabStateInternal = {
|
@@ -98,6 +98,12 @@ var TabStateInternal = {
|
||||||
tabData.muteReason = tab.muteReason;
|
tabData.muteReason = tab.muteReason;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ tabData.zenWorkspace = tab.getAttribute("zen-workspace-id");
|
+ tabData.zenWorkspace = tab.getAttribute("zen-workspace-id");
|
||||||
|
+ tabData.zenPinnedId = tab.getAttribute("zen-pin-id");
|
||||||
+ tabData.zenDefaultUserContextId = tab.getAttribute("zenDefaultUserContextId");
|
+ tabData.zenDefaultUserContextId = tab.getAttribute("zenDefaultUserContextId");
|
||||||
+ tabData.zenPinnedEntry = tab.getAttribute("zen-pinned-entry");
|
+ tabData.zenPinnedEntry = tab.getAttribute("zen-pinned-entry");
|
||||||
+ tabData.zenPinnedIcon = tab.getAttribute("zen-pinned-icon");
|
+ tabData.zenPinnedIcon = tab.getAttribute("zen-pinned-icon");
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..0c2623dff576b48086a0f26ea588e76720cbc664 100644
|
index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..4ff11ec41543e4ab2b4aa96548db60fd521e1e4c 100644
|
||||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
@@ -462,11 +462,26 @@
|
@@ -462,11 +462,26 @@
|
||||||
@@ -79,7 +79,7 @@ index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..0c2623dff576b48086a0f26ea588e767
|
|||||||
if (insertTab) {
|
if (insertTab) {
|
||||||
// insert the tab into the tab container in the correct position
|
// insert the tab into the tab container in the correct position
|
||||||
this._insertTabAtIndex(t, {
|
this._insertTabAtIndex(t, {
|
||||||
@@ -3291,6 +3315,14 @@
|
@@ -3291,6 +3315,17 @@
|
||||||
) {
|
) {
|
||||||
tabWasReused = true;
|
tabWasReused = true;
|
||||||
tab = this.selectedTab;
|
tab = this.selectedTab;
|
||||||
@@ -87,6 +87,9 @@ index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..0c2623dff576b48086a0f26ea588e767
|
|||||||
+ if (tabData.zenWorkspace) {
|
+ if (tabData.zenWorkspace) {
|
||||||
+ tab.setAttribute("zen-workspace-id", tabData.zenWorkspace);
|
+ tab.setAttribute("zen-workspace-id", tabData.zenWorkspace);
|
||||||
+ }
|
+ }
|
||||||
|
+ if (tabData.zenPinnedId) {
|
||||||
|
+ tab.setAttribute("zen-pin-id", tabData.zenPinnedId);
|
||||||
|
+ }
|
||||||
+ if (tabData.zenDefaultUserContextId) {
|
+ if (tabData.zenDefaultUserContextId) {
|
||||||
+ tab.setAttribute("zenDefaultUserContextId", "true");
|
+ tab.setAttribute("zenDefaultUserContextId", "true");
|
||||||
+ }
|
+ }
|
||||||
@@ -94,7 +97,7 @@ index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..0c2623dff576b48086a0f26ea588e767
|
|||||||
if (!tabData.pinned) {
|
if (!tabData.pinned) {
|
||||||
this.unpinTab(tab);
|
this.unpinTab(tab);
|
||||||
} else {
|
} else {
|
||||||
@@ -3304,6 +3336,9 @@
|
@@ -3304,6 +3339,9 @@
|
||||||
restoreTabsLazily && !select && !tabData.pinned;
|
restoreTabsLazily && !select && !tabData.pinned;
|
||||||
|
|
||||||
let url = "about:blank";
|
let url = "about:blank";
|
||||||
@@ -104,29 +107,31 @@ index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..0c2623dff576b48086a0f26ea588e767
|
|||||||
if (tabData.entries?.length) {
|
if (tabData.entries?.length) {
|
||||||
let activeIndex = (tabData.index || tabData.entries.length) - 1;
|
let activeIndex = (tabData.index || tabData.entries.length) - 1;
|
||||||
// Ensure the index is in bounds.
|
// Ensure the index is in bounds.
|
||||||
@@ -3340,6 +3375,12 @@
|
@@ -3340,6 +3378,15 @@
|
||||||
preferredRemoteType,
|
preferredRemoteType,
|
||||||
});
|
});
|
||||||
|
|
||||||
+ if (tabData.zenWorkspace) {
|
+ if (tabData.zenWorkspace) {
|
||||||
+ tab.setAttribute("zen-workspace-id", tabData.zenWorkspace);
|
+ tab.setAttribute("zen-workspace-id", tabData.zenWorkspace);
|
||||||
+ }
|
+ }
|
||||||
|
+ if (tabData.zenPinnedId) {
|
||||||
|
+ tab.setAttribute("zen-pin-id", tabData.zenPinnedId);
|
||||||
|
+ }
|
||||||
+ if (tabData.zenDefaultUserContextId) {
|
+ if (tabData.zenDefaultUserContextId) {
|
||||||
+ tab.setAttribute("zenDefaultUserContextId", "true");
|
+ tab.setAttribute("zenDefaultUserContextId", "true");
|
||||||
+ }
|
+ }
|
||||||
if (select) {
|
if (select) {
|
||||||
tabToSelect = tab;
|
tabToSelect = tab;
|
||||||
}
|
}
|
||||||
@@ -3374,7 +3415,7 @@
|
@@ -3374,7 +3421,6 @@
|
||||||
this.tabContainer._invalidateCachedTabs();
|
this.tabContainer._invalidateCachedTabs();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-
|
-
|
||||||
+ gZenPinnedTabManager.updatePinnedTabForSessionRestore(tabData, tab);
|
|
||||||
tab.initialize();
|
tab.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4148,6 +4189,13 @@
|
@@ -4148,6 +4194,13 @@
|
||||||
TelemetryStopwatch.start("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
|
TelemetryStopwatch.start("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +145,7 @@ index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..0c2623dff576b48086a0f26ea588e767
|
|||||||
// Handle requests for synchronously removing an already
|
// Handle requests for synchronously removing an already
|
||||||
// asynchronously closing tab.
|
// asynchronously closing tab.
|
||||||
if (!animate && aTab.closing) {
|
if (!animate && aTab.closing) {
|
||||||
@@ -4163,6 +4211,10 @@
|
@@ -4163,6 +4216,10 @@
|
||||||
// state).
|
// state).
|
||||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||||
|
|
||||||
@@ -151,7 +156,7 @@ index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..0c2623dff576b48086a0f26ea588e767
|
|||||||
if (
|
if (
|
||||||
!this._beginRemoveTab(aTab, {
|
!this._beginRemoveTab(aTab, {
|
||||||
closeWindowFastpath: true,
|
closeWindowFastpath: true,
|
||||||
@@ -5123,10 +5175,10 @@
|
@@ -5123,10 +5180,10 @@
|
||||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -164,7 +169,7 @@ index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..0c2623dff576b48086a0f26ea588e767
|
|||||||
aTab.selected ||
|
aTab.selected ||
|
||||||
aTab.closing ||
|
aTab.closing ||
|
||||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||||
@@ -7042,6 +7094,7 @@
|
@@ -7042,6 +7099,7 @@
|
||||||
aWebProgress.isTopLevel
|
aWebProgress.isTopLevel
|
||||||
) {
|
) {
|
||||||
this.mTab.setAttribute("busy", "true");
|
this.mTab.setAttribute("busy", "true");
|
||||||
@@ -172,7 +177,7 @@ index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..0c2623dff576b48086a0f26ea588e767
|
|||||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||||
gBrowser.syncThrobberAnimations(this.mTab);
|
gBrowser.syncThrobberAnimations(this.mTab);
|
||||||
@@ -7874,7 +7927,7 @@ var TabContextMenu = {
|
@@ -7874,7 +7932,7 @@ var TabContextMenu = {
|
||||||
);
|
);
|
||||||
contextUnpinSelectedTabs.hidden =
|
contextUnpinSelectedTabs.hidden =
|
||||||
!this.contextTab.pinned || !multiselectionContext;
|
!this.contextTab.pinned || !multiselectionContext;
|
||||||
|
12
src/toolkit/themes/linux/global/menu-css.patch
Normal file
12
src/toolkit/themes/linux/global/menu-css.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/toolkit/themes/linux/global/menu.css b/toolkit/themes/linux/global/menu.css
|
||||||
|
index da47f78790a251bb573d992476dc5dac9a870857..6c7d6cbdaf3f0bd35a52c80785577a6bc0d55e29 100644
|
||||||
|
--- a/toolkit/themes/linux/global/menu.css
|
||||||
|
+++ b/toolkit/themes/linux/global/menu.css
|
||||||
|
@@ -52,7 +52,6 @@ menulist > menupopup > :is(menuitem, menucaption, menu) {
|
||||||
|
|
||||||
|
.menu-text {
|
||||||
|
/* This is (18 + the size of end-padding on .menu-iconic-left)px */
|
||||||
|
- margin-inline-start: 21px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-accel,
|
Reference in New Issue
Block a user