mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-17 07:16:16 +00:00
Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
This commit is contained in:
@@ -90,6 +90,8 @@ pref('zen.tabs.show-newtab-vertical', true);
|
|||||||
pref('zen.view.show-newtab-button-border-top', false);
|
pref('zen.view.show-newtab-button-border-top', false);
|
||||||
pref('zen.view.show-newtab-button-top', true);
|
pref('zen.view.show-newtab-button-top', true);
|
||||||
|
|
||||||
|
perf('zen.mediacontrols.enabled', true);
|
||||||
|
|
||||||
#ifdef MOZILLA_OFFICIAL
|
#ifdef MOZILLA_OFFICIAL
|
||||||
pref('zen.rice.api.url', 'https://share.zen-browser.app', locked);
|
pref('zen.rice.api.url', 'https://share.zen-browser.app', locked);
|
||||||
pref('zen.injections.match-urls', 'https://zen-browser.app/*,https://share.zen-browser.app/*', locked);
|
pref('zen.injections.match-urls', 'https://zen-browser.app/*,https://share.zen-browser.app/*', locked);
|
||||||
|
@@ -21,6 +21,8 @@ class ZenMediaController {
|
|||||||
_controllerSwitchTimeout = null;
|
_controllerSwitchTimeout = null;
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
if (!Services.prefs.getBoolPref('zen.mediacontrols.enabled', true)) return;
|
||||||
|
|
||||||
this.mediaTitle = document.querySelector('#zen-media-title');
|
this.mediaTitle = document.querySelector('#zen-media-title');
|
||||||
this.mediaArtist = document.querySelector('#zen-media-artist');
|
this.mediaArtist = document.querySelector('#zen-media-artist');
|
||||||
this.mediaControlBar = document.querySelector('#zen-media-controls-toolbar');
|
this.mediaControlBar = document.querySelector('#zen-media-controls-toolbar');
|
||||||
|
@@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/toolkit/components/pictureinpicture/content/player.js b/toolkit/components/pictureinpicture/content/player.js
|
||||||
|
index 9a4971d5d24dba6e543be8ea321c6be8c43ad859..b0788967e51736b1ec95daf96a1504bfd7c1dea7 100644
|
||||||
|
--- a/toolkit/components/pictureinpicture/content/player.js
|
||||||
|
+++ b/toolkit/components/pictureinpicture/content/player.js
|
||||||
|
@@ -722,6 +722,11 @@ let Player = {
|
||||||
|
document.getElementById("large").click();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ case "minimize": {
|
||||||
|
+ this.closePipWindow({ reason: "CloseButton" });
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
// If the click came from a element that is not inside the subtitles settings panel
|
||||||
|
// then we want to hide the panel
|
@@ -0,0 +1,29 @@
|
|||||||
|
diff --git a/toolkit/components/pictureinpicture/content/player.xhtml b/toolkit/components/pictureinpicture/content/player.xhtml
|
||||||
|
index 440ce51e8e67e4d3a7bdcb78f38f2fb6684c9848..6b48a3178f9de460dd3b08728f5638ef2751de21 100644
|
||||||
|
--- a/toolkit/components/pictureinpicture/content/player.xhtml
|
||||||
|
+++ b/toolkit/components/pictureinpicture/content/player.xhtml
|
||||||
|
@@ -52,13 +52,22 @@
|
||||||
|
tabindex="10"
|
||||||
|
#endif
|
||||||
|
/>
|
||||||
|
- <button id="unpip"
|
||||||
|
- class="control-item control-button tooltip-under-controls" data-l10n-id="pictureinpicture-unpip-btn" data-l10n-attrs="tooltip"
|
||||||
|
+ <button id="minimize"
|
||||||
|
+ class="control-item control-button tooltip-under-controls" data-l10n-id="pictureinpicture-minimize-btn" data-l10n-attrs="tooltip"
|
||||||
|
#ifdef XP_MACOSX
|
||||||
|
mac="true"
|
||||||
|
tabindex="10"
|
||||||
|
#else
|
||||||
|
tabindex="9"
|
||||||
|
+#endif
|
||||||
|
+ />
|
||||||
|
+ <button id="unpip"
|
||||||
|
+ class="control-item control-button tooltip-under-controls" data-l10n-id="pictureinpicture-unpip-btn" data-l10n-attrs="tooltip"
|
||||||
|
+#ifdef XP_MACOSX
|
||||||
|
+ mac="true"
|
||||||
|
+ tabindex="11"
|
||||||
|
+#else
|
||||||
|
+ tabindex="10"
|
||||||
|
#endif
|
||||||
|
/>
|
||||||
|
<div id="controls-bottom-gradient" class="control-item"></div>
|
22
src/toolkit/themes/shared/pictureinpicture/player-css.patch
Normal file
22
src/toolkit/themes/shared/pictureinpicture/player-css.patch
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/toolkit/themes/shared/pictureinpicture/player.css b/toolkit/themes/shared/pictureinpicture/player.css
|
||||||
|
index a3ffe31d47cc81a0cb578acc9177aaa6f41668eb..cf69507804b7c50f9afcfabb744098cfbe409396 100644
|
||||||
|
--- a/toolkit/themes/shared/pictureinpicture/player.css
|
||||||
|
+++ b/toolkit/themes/shared/pictureinpicture/player.css
|
||||||
|
@@ -724,3 +724,17 @@ input:checked + .slider::before {
|
||||||
|
justify-self: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+#minimize {
|
||||||
|
+ background-image: url("chrome://browser/skin/zen-icons/unpin.svg");
|
||||||
|
+ background-color: rgba(255, 255, 255, .8);
|
||||||
|
+ position: absolute;
|
||||||
|
+ fill: var(--close-btn-fill-color);
|
||||||
|
+ right: 50px;
|
||||||
|
+ top: 10px;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#minimize[mac="true"] {
|
||||||
|
+ right: auto;
|
||||||
|
+ left: 50px;
|
||||||
|
+}
|
Reference in New Issue
Block a user