Skip to content

Commit 3b56abf

Browse files
committed
fix: Small fixes for split view and glance, b=(no-bug), c=common, compact-mode, split-view, tabs
1 parent 590ba6d commit 3b56abf

File tree

12 files changed

+46
-60
lines changed

12 files changed

+46
-60
lines changed

l10n

src/browser/components/preferences/zen-settings.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,11 +1232,6 @@ Preferences.addAll([
12321232
type: 'bool',
12331233
default: false,
12341234
},
1235-
{
1236-
id: 'browser.tabs.unloadOnLowMemory',
1237-
type: 'bool',
1238-
default: true,
1239-
},
12401235
{
12411236
id: 'zen.mods.auto-update',
12421237
type: 'bool',

src/browser/components/preferences/zenTabsManagement.inc.xhtml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,6 @@
3131
<html:h1 data-l10n-id="pane-zen-tabs-unloader-title"/>
3232
</hbox>
3333

34-
<groupbox id="zenTabsUnloadGroup" data-category="paneZenTabManagement" hidden="true" class="highlighting-group">
35-
<label><html:h2 data-l10n-id="zen-tabs-unloader-header"/></label>
36-
<description class="description-deemphasized" data-l10n-id="zen-tabs-unloader-description" />
37-
38-
<checkbox id="zenTabsUnloadActivate"
39-
data-l10n-id="zen-tabs-unloader-enabled"
40-
preference="browser.tabs.unloadOnLowMemory"/>
41-
</groupbox>
42-
4334
<hbox id="zenPinnedTabsManagerCategory"
4435
class="subcategory"
4536
hidden="true"

src/browser/themes/shared/zen-icons/icons.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@
121121
list-style-image: url('tab.svg') !important;
122122
}
123123

124+
#context-navigation > menuitem {
125+
padding: 4px;
126+
}
127+
124128
#history-panelmenu,
125129
.urlbarView-row[source='history']
126130
> .urlbarView-row-inner

src/zen/common/ZenUIManager.mjs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,12 +1068,7 @@ var gZenVerticalTabsManager = {
10681068
!gZenVerticalTabsManager._prefsSidebarExpanded
10691069
)
10701070
return;
1071-
this._tabEdited =
1072-
event.target.closest('.tabbrowser-tab') ||
1073-
event.target.closest('.zen-current-workspace-indicator-name') ||
1074-
gZenWorkspaces.activeWorkspaceIndicator.querySelector(
1075-
'.zen-current-workspace-indicator-name'
1076-
);
1071+
this._tabEdited = event.target.closest('.tabbrowser-tab');
10771072
if (
10781073
!this._tabEdited ||
10791074
((!this._tabEdited.pinned || this._tabEdited.hasAttribute('zen-essential')) && isTab)

src/zen/common/ZenUIMigration.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ class ZenUIMigration {
9090
}
9191

9292
_migrateV4(win) {
93+
if (AppConstants.platform === 'linux') {
94+
return;
95+
}
9396
Services.prefs.setBoolPref(
9497
'browser.tabs.unloadOnLowMemory',
9598
Services.prefs.getBoolPref('zen.tab-unloader.enabled', true)

src/zen/common/styles/zen-browser-ui.css

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@
7878
transition: background-color var(--inactive-window-transition);
7979
}
8080

81-
@media (not (-moz-windows-mica)) and -moz-pref('zen.view.grey-out-inactive-windows') {
82-
transition: color var(--inactive-window-transition);
83-
:root:not([zen-welcome-stage]) &:-moz-window-inactive {
84-
color: var(--toolbox-textcolor-inactive);
85-
&::before {
86-
background-color: var(--toolbox-bgcolor-inactive);
87-
}
88-
}
89-
}
90-
9181
#zen-browser-grain {
9282
content: '';
9383
width: 100%;
@@ -131,9 +121,7 @@
131121
z-index: 1;
132122
}
133123

134-
@media (-moz-windows-accent-color-in-titlebar) and (-moz-windows-mica) {
135-
background-color: ActiveCaption;
136-
color: CaptionText;
124+
@media -moz-pref('zen.view.grey-out-inactive-windows') {
137125
transition: background-color var(--inactive-window-transition);
138126
&:-moz-window-inactive {
139127
background-color: InactiveCaption;
@@ -264,6 +252,7 @@
264252
opacity: 0;
265253
transition: opacity 0.1s ease-in-out;
266254
pointer-events: none;
255+
transform: translateX(-50%);
267256
}
268257

269258
&:hover::before {

src/zen/common/styles/zen-popup.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ menupopup,
4141
panel {
4242
--panel-background: var(--arrowpanel-background);
4343
--panel-border-radius: var(--zen-native-inner-radius);
44-
--menuitem-padding: 6px 5px !important;
44+
--menuitem-padding: 6px !important;
4545
}
4646

4747
/* split-view popup */

src/zen/compact-mode/ZenCompactMode.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ var gZenCompactModeManager = {
9191
this.preference === value ||
9292
document.documentElement.hasAttribute('zen-compact-animating')
9393
) {
94-
if (typeof this._wasInCompactMode !== 'undefined') {
95-
// We wont do anything with it anyway, so we remove it
96-
delete this._wasInCompactMode;
97-
}
9894
// We dont want the user to be able to spam the button
9995
return value;
10096
}

src/zen/split-view/ZenViewSplitter.mjs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
210210
const node = this.getSplitNodeFromTab(tab);
211211
const toUpdate = this.removeNode(node);
212212
this.applyGridLayout(toUpdate);
213+
// Select next tab if the removed tab was selected
214+
if (gBrowser.selectedTab === tab) {
215+
gBrowser.selectedTab = group.tabs[0];
216+
}
213217
}
214218
}
215219

@@ -946,8 +950,8 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
946950
window.gContextMenu.contentData.docLocation ||
947951
window.gContextMenu.target.ownerDocument.location.href;
948952
const currentTab = gZenGlanceManager.getTabOrGlanceParent(window.gBrowser.selectedTab);
949-
const newTab = this.openAndSwitchToTab(url);
950-
this.splitTabs([currentTab, newTab]);
953+
const newTab = this.openAndSwitchToTab(url, { inBackground: false });
954+
this.splitTabs([currentTab, newTab], 'grid', 1);
951955
}
952956

953957
/**
@@ -1090,7 +1094,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
10901094
};
10911095
this._data.push(splitData);
10921096
if (!this._sessionRestoring) {
1093-
window.gBrowser.selectedTab = tabs[0];
1097+
window.gBrowser.selectedTab = tabs[initialIndex] ?? tabs[0];
10941098
}
10951099

10961100
// Add tabs to the split view group

0 commit comments

Comments
 (0)