mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-07 17:15:30 +02:00
feat: Improved lightness detection and media sharing controls, b=no-bug, c=media, workspaces
This commit is contained in:
parent
1a3a8a09e1
commit
e068428601
5 changed files with 13 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
||||||
diff --git a/browser/base/content/browser-commands.js b/browser/base/content/browser-commands.js
|
diff --git a/browser/base/content/browser-commands.js b/browser/base/content/browser-commands.js
|
||||||
index b0b2383453ef771af3eb9260618f1e2e3022eb4e..7c5844582d9adb55c55fb1627a9980cf0e5c110b 100644
|
index b0b2383453ef771af3eb9260618f1e2e3022eb4e..d631cc8db95b4285e892ac8fcb5e72b7da489850 100644
|
||||||
--- a/browser/base/content/browser-commands.js
|
--- a/browser/base/content/browser-commands.js
|
||||||
+++ b/browser/base/content/browser-commands.js
|
+++ b/browser/base/content/browser-commands.js
|
||||||
@@ -318,6 +318,10 @@ var BrowserCommands = {
|
@@ -318,6 +318,10 @@ var BrowserCommands = {
|
||||||
|
@ -13,21 +13,19 @@ index b0b2383453ef771af3eb9260618f1e2e3022eb4e..7c5844582d9adb55c55fb1627a9980cf
|
||||||
// A notification intended to be useful for modular peformance tracking
|
// A notification intended to be useful for modular peformance tracking
|
||||||
// starting as close as is reasonably possible to the time when the user
|
// starting as close as is reasonably possible to the time when the user
|
||||||
// expressed the intent to open a new tab. Since there are a lot of
|
// expressed the intent to open a new tab. Since there are a lot of
|
||||||
@@ -402,6 +406,13 @@ var BrowserCommands = {
|
@@ -402,6 +406,11 @@ var BrowserCommands = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (gBrowser.selectedTab.hasAttribute("zen-empty-tab")) {
|
+ if (gBrowser.selectedTab.hasAttribute("zen-empty-tab")) {
|
||||||
+ if (gZenWorkspaces.shouldCloseWindow()) {
|
+ gZenWorkspaces.handleTabCloseWindow();
|
||||||
+ closeWindow(true);
|
|
||||||
+ }
|
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
// Keyboard shortcuts that would close a tab that is pinned select the first
|
// Keyboard shortcuts that would close a tab that is pinned select the first
|
||||||
// unpinned tab instead.
|
// unpinned tab instead.
|
||||||
if (
|
if (
|
||||||
@@ -409,8 +420,8 @@ var BrowserCommands = {
|
@@ -409,8 +418,8 @@ var BrowserCommands = {
|
||||||
(event.ctrlKey || event.metaKey || event.altKey) &&
|
(event.ctrlKey || event.metaKey || event.altKey) &&
|
||||||
gBrowser.selectedTab.pinned
|
gBrowser.selectedTab.pinned
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -34,12 +34,8 @@
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&[media-sharing] #zen-media-controls-hbox > toolbarbutton:not(:first-child) {
|
&[media-sharing] :is(#zen-media-playback-buttons, #zen-media-mute-button) {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
#media-device-buttons {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not([can-pip]) {
|
&:not([can-pip]) {
|
||||||
|
|
|
@ -1140,7 +1140,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldBeDarkMode(accentColor) {
|
shouldBeDarkMode(accentColor) {
|
||||||
let minimalLum = 0.5;
|
let minimalLum = 0.6;
|
||||||
if (!this.canBeTransparent) {
|
if (!this.canBeTransparent) {
|
||||||
// Blend the color with the toolbar background
|
// Blend the color with the toolbar background
|
||||||
const toolbarBg = this.getToolbarModifiedBaseRaw();
|
const toolbarBg = this.getToolbarModifiedBaseRaw();
|
||||||
|
|
|
@ -2944,4 +2944,10 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
gBrowser.tabContainer.removeAttribute('overflow');
|
gBrowser.tabContainer.removeAttribute('overflow');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleTabCloseWindow() {
|
||||||
|
if (this.shouldCloseWindow()) {
|
||||||
|
document.getElementById('cmd_closeWindow').doCommand();
|
||||||
|
}
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
"brandShortName": "Zen",
|
"brandShortName": "Zen",
|
||||||
"brandFullName": "Zen Browser",
|
"brandFullName": "Zen Browser",
|
||||||
"release": {
|
"release": {
|
||||||
"displayVersion": "1.14.2b",
|
"displayVersion": "1.14.3b",
|
||||||
"github": {
|
"github": {
|
||||||
"repo": "zen-browser/desktop"
|
"repo": "zen-browser/desktop"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue