mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-07 03:48:22 +00:00
Added watermark and springs
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
|
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
|
||||||
index aec0983a6704f09300da9a3a9ab76e627695b708..4228c96f59d6054c19c95686cafa979594e7da1f 100644
|
index 3063370347db9e2812ad30205e585c849e44c91e..be74d9e624b8220cb9bd009bae31fb513c4ec73f 100644
|
||||||
--- a/browser/base/content/browser.xhtml
|
--- a/browser/base/content/browser.xhtml
|
||||||
+++ b/browser/base/content/browser.xhtml
|
+++ b/browser/base/content/browser.xhtml
|
||||||
@@ -140,6 +140,8 @@
|
@@ -139,6 +139,8 @@
|
||||||
window.addEventListener("DOMContentLoaded",
|
window.addEventListener("DOMContentLoaded",
|
||||||
gBrowserInit.onDOMContentLoaded.bind(gBrowserInit), { once: true });
|
gBrowserInit.onDOMContentLoaded.bind(gBrowserInit), { once: true });
|
||||||
</script>
|
</script>
|
||||||
@@ -11,7 +11,7 @@ index aec0983a6704f09300da9a3a9ab76e627695b708..4228c96f59d6054c19c95686cafa9795
|
|||||||
</head>
|
</head>
|
||||||
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
# All sets except for popupsets (commands, keys, and stringbundles)
|
# All sets except for popupsets (commands, keys, and stringbundles)
|
||||||
@@ -161,9 +163,12 @@
|
@@ -160,9 +162,12 @@
|
||||||
</vbox>
|
</vbox>
|
||||||
</html:template>
|
</html:template>
|
||||||
|
|
||||||
@@ -27,3 +27,10 @@ index aec0983a6704f09300da9a3a9ab76e627695b708..4228c96f59d6054c19c95686cafa9795
|
|||||||
|
|
||||||
<html:template id="customizationPanel">
|
<html:template id="customizationPanel">
|
||||||
<box id="customization-container" flex="1" hidden="true"><![CDATA[
|
<box id="customization-container" flex="1" hidden="true"><![CDATA[
|
||||||
|
@@ -176,5 +181,6 @@
|
||||||
|
|
||||||
|
<!-- Put it at the very end to make sure it's not covered by anything. -->
|
||||||
|
<html:div id="fullscr-toggler" hidden="hidden"/>
|
||||||
|
+#include zen-watermark.inc.xhtml
|
||||||
|
</html:body>
|
||||||
|
</html>
|
||||||
|
4
src/browser/base/content/zen-watermark.inc.xhtml
Normal file
4
src/browser/base/content/zen-watermark.inc.xhtml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
<html:div id="zen-watermark">
|
||||||
|
<image src="chrome://branding/content/about-logo.png" />
|
||||||
|
</html:div>
|
@@ -95,6 +95,7 @@
|
|||||||
|
|
||||||
_zenInitBrowserLayout() {
|
_zenInitBrowserLayout() {
|
||||||
if (!this._inMainBrowserWindow) return;
|
if (!this._inMainBrowserWindow) return;
|
||||||
|
this.openWatermark();
|
||||||
console.log("ZenThemeModifier: init browser layout");
|
console.log("ZenThemeModifier: init browser layout");
|
||||||
const kNavbarItems = [
|
const kNavbarItems = [
|
||||||
"nav-bar",
|
"nav-bar",
|
||||||
@@ -130,6 +131,21 @@
|
|||||||
console.log("ZenThemeModifier: setting avatar image to", profile.zenAvatarPath);
|
console.log("ZenThemeModifier: setting avatar image to", profile.zenAvatarPath);
|
||||||
mainWindowEl.style.setProperty("--zen-avatar-image-url", `url(${profile.zenAvatarPath})`);
|
mainWindowEl.style.setProperty("--zen-avatar-image-url", `url(${profile.zenAvatarPath})`);
|
||||||
mainWindowEl.style.setProperty("--avatar-image-url", `var(--zen-avatar-image-url)`, "important");
|
mainWindowEl.style.setProperty("--avatar-image-url", `var(--zen-avatar-image-url)`, "important");
|
||||||
|
this.closeWatermark();
|
||||||
|
},
|
||||||
|
|
||||||
|
openWatermark() {
|
||||||
|
const watermark = document.getElementById("zen-watermark");
|
||||||
|
if (watermark) {
|
||||||
|
watermark.removeAttribute("hidden");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
closeWatermark() {
|
||||||
|
const watermark = document.getElementById("zen-watermark");
|
||||||
|
if (watermark) {
|
||||||
|
watermark.setAttribute("hidden", "true");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
|
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||||
index f466105b8290b13c672351bb68dd92644dd670fe..7861d98a3679d7d81ea2076bb31d2c49425e7854 100644
|
index f466105b8290b13c672351bb68dd92644dd670fe..b195cd59d7ff07ff512e7388c9dc33f3c661d955 100644
|
||||||
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
|
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||||
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
|
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||||
@@ -25,7 +25,7 @@ ChromeUtils.defineLazyGetter(lazy, "gWidgetsBundle", function () {
|
@@ -25,7 +25,7 @@ ChromeUtils.defineLazyGetter(lazy, "gWidgetsBundle", function () {
|
||||||
@@ -11,13 +11,10 @@ index f466105b8290b13c672351bb68dd92644dd670fe..7861d98a3679d7d81ea2076bb31d2c49
|
|||||||
|
|
||||||
const kSpecialWidgetPfx = "customizableui-special-";
|
const kSpecialWidgetPfx = "customizableui-special-";
|
||||||
|
|
||||||
@@ -250,13 +250,10 @@ var CustomizableUIInternal = {
|
@@ -253,10 +253,9 @@ var CustomizableUIInternal = {
|
||||||
? null
|
"spring",
|
||||||
: "home-button",
|
|
||||||
Services.prefs.getBoolPref("sidebar.revamp") ? "sidebar-button" : null,
|
|
||||||
- "spring",
|
|
||||||
"urlbar-container",
|
"urlbar-container",
|
||||||
- "spring",
|
"spring",
|
||||||
- "save-to-pocket-button",
|
- "save-to-pocket-button",
|
||||||
"downloads-button",
|
"downloads-button",
|
||||||
AppConstants.MOZ_DEV_EDITION ? "developer-button" : null,
|
AppConstants.MOZ_DEV_EDITION ? "developer-button" : null,
|
||||||
@@ -26,7 +23,7 @@ index f466105b8290b13c672351bb68dd92644dd670fe..7861d98a3679d7d81ea2076bb31d2c49
|
|||||||
lazy.resetPBMToolbarButtonEnabled ? "reset-pbm-toolbar-button" : null,
|
lazy.resetPBMToolbarButtonEnabled ? "reset-pbm-toolbar-button" : null,
|
||||||
].filter(name => name);
|
].filter(name => name);
|
||||||
|
|
||||||
@@ -288,7 +285,7 @@ var CustomizableUIInternal = {
|
@@ -288,7 +287,7 @@ var CustomizableUIInternal = {
|
||||||
{
|
{
|
||||||
type: CustomizableUI.TYPE_TOOLBAR,
|
type: CustomizableUI.TYPE_TOOLBAR,
|
||||||
defaultPlacements: [
|
defaultPlacements: [
|
||||||
|
@@ -524,3 +524,31 @@ panelmultiview {
|
|||||||
right: 1.5%;
|
right: 1.5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Watermark */
|
||||||
|
|
||||||
|
#zen-watermark {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: var(--zen-main-browser-background);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zen-watermark image {
|
||||||
|
opacity: .2;
|
||||||
|
filter: grayscale(100%);
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zen-watermark[hidden="true"] {
|
||||||
|
transition: .2s;
|
||||||
|
transition-delay: 2s;
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user