mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-24 21:56:10 +00:00
fix: Small fixes to tab aligment and dialog colors, b=no-bug, c=tabs, workspaces
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
index 2a055f0c5f34f0a2667f659185120c07d38f4e41..5b16b12fb02799b12543294a9fccceef47067d53 100644
|
||||
index 2a055f0c5f34f0a2667f659185120c07d38f4e41..6b05f51e4731af3d1fc96b257fa0d35582182e4b 100644
|
||||
--- a/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
@@ -127,6 +127,9 @@ const TAB_EVENTS = [
|
||||
@@ -54,6 +54,15 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..5b16b12fb02799b12543294a9fccceef
|
||||
let tabbrowser = aWindow.gBrowser;
|
||||
|
||||
// add tab change listeners to all already existing tabs
|
||||
@@ -2076,7 +2085,7 @@ var SessionStoreInternal = {
|
||||
let isTaskbarTab = this._windows[aWindow.__SSi].isTaskbarTab;
|
||||
// A regular window is not a private window, taskbar tab window, or popup window
|
||||
let isRegularWindow =
|
||||
- !isPrivateWindow && !isTaskbarTab && aWindow.toolbar.visible;
|
||||
+ !isPrivateWindow && !isTaskbarTab && aWindow.toolbar.visible && !this._windows[aWindow.__SSi].isZenUnsynced;
|
||||
|
||||
// perform additional initialization when the first window is loading
|
||||
if (lazy.RunState.isStopped) {
|
||||
@@ -2131,6 +2140,7 @@ var SessionStoreInternal = {
|
||||
null,
|
||||
"sessionstore-one-or-no-tab-restored"
|
||||
@@ -284,7 +293,17 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..5b16b12fb02799b12543294a9fccceef
|
||||
|
||||
if (tabData.pinned) {
|
||||
tabbrowser.pinTab(tab);
|
||||
@@ -7343,7 +7403,7 @@ var SessionStoreInternal = {
|
||||
@@ -6567,6 +6627,9 @@ var SessionStoreInternal = {
|
||||
aWindow.gURLBar.readOnly = false;
|
||||
}
|
||||
}
|
||||
+ if (aWinData.isZenUnsynced) {
|
||||
+ this._windows[aWindow.__SSi].isZenUnsynced = true;
|
||||
+ }
|
||||
|
||||
let promiseParts = Promise.withResolvers();
|
||||
aWindow.setTimeout(() => {
|
||||
@@ -7343,7 +7406,7 @@ var SessionStoreInternal = {
|
||||
|
||||
let groupsToSave = new Map();
|
||||
for (let tIndex = 0; tIndex < window.tabs.length; ) {
|
||||
@@ -293,7 +312,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..5b16b12fb02799b12543294a9fccceef
|
||||
// Adjust window.selected
|
||||
if (tIndex + 1 < window.selected) {
|
||||
window.selected -= 1;
|
||||
@@ -7358,7 +7418,7 @@ var SessionStoreInternal = {
|
||||
@@ -7358,7 +7421,7 @@ var SessionStoreInternal = {
|
||||
);
|
||||
// We don't want to increment tIndex here.
|
||||
continue;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/themes/shared/tabbrowser/content-area.css b/browser/themes/shared/tabbrowser/content-area.css
|
||||
index b00139d7af878326ff303c08d5ddd47501b8c7db..52bad3e978004f3322f3d504cbd663e7b620b69f 100644
|
||||
index b00139d7af878326ff303c08d5ddd47501b8c7db..7361a5e98d6ea372f6fdc583d90044d276cfb81b 100644
|
||||
--- a/browser/themes/shared/tabbrowser/content-area.css
|
||||
+++ b/browser/themes/shared/tabbrowser/content-area.css
|
||||
@@ -90,7 +90,6 @@
|
||||
@@ -32,7 +32,7 @@ index b00139d7af878326ff303c08d5ddd47501b8c7db..52bad3e978004f3322f3d504cbd663e7
|
||||
.dialogOverlay[topmost="true"],
|
||||
#window-modal-dialog::backdrop {
|
||||
- background-color: var(--dialog-backdrop-color);
|
||||
+ background-color: light-dark(rgba(255, 255, 255, .2), rgba(0, 0, 0, .2));
|
||||
+ background-color: light-dark(rgba(255, 255, 255, .3), rgba(0, 0, 0, .3));
|
||||
}
|
||||
|
||||
.dialogOverlay[hideContent="true"][topmost="true"] {
|
||||
|
||||
@@ -314,6 +314,16 @@ export class nsZenSessionManager {
|
||||
delete this._migrationData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a given window data object is saveable.
|
||||
*
|
||||
* @param {object} aWinData - The window data object to check.
|
||||
* @returns {boolean} True if the window is saveable, false otherwise.
|
||||
*/
|
||||
#isWindowSaveable(aWinData) {
|
||||
return !aWinData.isPopup && !aWinData.isTaskbarTab && !aWinData.isZenUnsynced;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the current session state. Collects data and writes to disk.
|
||||
*
|
||||
@@ -321,7 +331,7 @@ export class nsZenSessionManager {
|
||||
*/
|
||||
saveState(state) {
|
||||
let windows = state?.windows || [];
|
||||
windows = windows.filter((win) => !win.isPopup && !win.isTaskbarTab && !win.isZenUnsynced);
|
||||
windows = windows.filter((win) => this.#isWindowSaveable(win));
|
||||
if (!windows.length || !lazy.gWindowSyncEnabled) {
|
||||
// Don't save (or even collect) anything in permanent private
|
||||
// browsing mode. We also don't want to save if there are no windows.
|
||||
|
||||
@@ -496,6 +496,11 @@
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs {
|
||||
--toolbarbutton-inner-padding: 6px !important;
|
||||
--tab-icon-end-margin: var(--toolbarbutton-inner-padding) !important;
|
||||
}
|
||||
|
||||
& .tab-audio-button {
|
||||
margin-inline-start: -4px;
|
||||
margin-inline-end: 2px;
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
/* Mark workspaces indicator */
|
||||
.zen-current-workspace-indicator {
|
||||
--indicator-gap: 10px;
|
||||
--indicator-gap: var(--toolbarbutton-inner-padding);
|
||||
padding: calc(2px + var(--tab-inline-padding) + var(--zen-toolbox-padding));
|
||||
font-weight: 500;
|
||||
position: relative;
|
||||
@@ -208,8 +208,10 @@
|
||||
align-items: center;
|
||||
fill-opacity: 0.6;
|
||||
-moz-context-properties: fill-opacity, fill;
|
||||
fill: currentColor;
|
||||
font-size: 14px;
|
||||
fill: var(--toolbox-textcolor);
|
||||
font-size: 16px;
|
||||
padding-top: 2px;
|
||||
color: light-dark(rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0.8));
|
||||
|
||||
&[zen-emoji-open='true']::before {
|
||||
border: 1px dashed light-dark(rgba(0, 0, 0, .5), rgba(255, 255, 255, .5));
|
||||
@@ -231,13 +233,13 @@
|
||||
}
|
||||
|
||||
.zen-current-workspace-indicator-name {
|
||||
display: flex;
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
cursor: auto;
|
||||
white-space: nowrap;
|
||||
font-weight: 600;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
|
||||
:root[zen-unsynced-window] & {
|
||||
|
||||
Reference in New Issue
Block a user