chore: Update border radius for zen-global-shared.css and zen-xul.css

This commit is contained in:
Mauro Balades
2024-05-12 10:45:40 +02:00
parent 813d99e235
commit 49f8813c74
8 changed files with 84 additions and 20 deletions

View File

@@ -139,6 +139,6 @@ pref('dom.security.sanitizer.enabled', true);
//pref("browser.profiles.enabled", true);
// Zen Sidebar
pref('zen.sidebar.data', "{\"data\":\n {\"p1\":{\n \"url\":\"https://web.whatsapp.com/\"\n },\n\"p2\":{\n \"url\":\"https://open.spotify.com/\",\n\"ua\": true\n },\n\"p3\": {\n \"url\": \"https://www.youtube.com/\",\n\"ua\": true\n}},\n\"index\":[\"p1\",\"p2\",\"p3\"]\n}");
pref('zen.sidebar.data', "{\"data\":\n {\"p1\":{\n \"url\":\"https://www.wikipedia.org/\"\n },\n\"p2\":{\n \"url\":\"https://m.twitter.com/\",\n\"ua\": true\n },\n\"p3\": {\n \"url\": \"https://www.youtube.com/\",\n\"ua\": true\n},\n\"p4\": {\n \"url\": \"https://translate.google.com/\",\n\"ua\": true\n},\n\"p5\": {\n \"url\": \"https://todoist.com/\",\n\"ua\": true\n}},\n\"index\":[\"p1\",\"p2\",\"p3\",\"p4\",\"p5\"]}");
pref('zen.sidebar.enabled', true);
pref('zen.sidebar.floating', true);

View File

@@ -45,15 +45,15 @@ var gZenBrowserManagerSidebar = {
let sidebarWidth = sidebar.getBoundingClientRect().width;
let startX = event.clientX;
let startWidth = sidebarWidth;
let mouseMove = (function(event) {
let newWidth = startWidth + event.clientX - startX;
let mouseMove = (function(e) {
let newWidth = startWidth + e.clientX - startX;
if (newWidth <= minWidth+10) {
newWidth = minWidth+1;
} else if (newWidth >= maxWidth-10) {
newWidth = maxWidth-1;
}
sidebar.style.width = `${newWidth}px`;
}).bind(this);
});
let mouseUp = (function() {
this.handleEvent();
this._isDragging = false;
@@ -242,12 +242,14 @@ var gZenBrowserManagerSidebar = {
let sidebar = this._openAndGetWebPanelWrapper();
this._hideAllWebPanels();
if (!this._currentPanel) {
sidebar.setAttribute("hidden", "true");
return;
}
let existantWebview = sidebar.querySelector(`browser[zen-sidebar-id="${this._currentPanel}"]`);
let existantWebview = this._getCurrentBrowser();
if (existantWebview) {
existantWebview.browsingContext.isActive = true;
existantWebview.removeAttribute("hidden");
document.getElementById("zen-sidebar-web-panel-title").textContent = existantWebview.contentTitle;
return;
}
let data = this._getWebPanelData(this._currentPanel);
@@ -273,6 +275,8 @@ var gZenBrowserManagerSidebar = {
},
_createWebPanelBrowser(data) {
const titleContainer = document.getElementById("zen-sidebar-web-panel-title");
titleContainer.textContent = "";
let browser = gBrowser.createBrowser({});
browser.setAttribute("disablefullscreen", "true");
browser.setAttribute("src", data.url);
@@ -282,6 +286,24 @@ var gZenBrowserManagerSidebar = {
browser.setAttribute("autocompletepopup", "PopupAutoComplete");
browser.setAttribute("contextmenu", "contentAreaContextMenu");
browser.setAttribute("disablesecurity", "true");
browser.addEventListener("pagetitlechanged", (function(event) {
let browser = event.target;
let title = browser.contentTitle;
if (!title) {
return;
}
let id = browser.getAttribute("zen-sidebar-id");
if (id === this._currentPanel) {
titleContainer.textContent = title;
}
}).bind(this));
browser.addEventListener("progress", (function(event) {
let browser = event.target;
let id = browser.getAttribute("zen-sidebar-id");
if (id === this._currentPanel) {
titleContainer.textContent = "Loading..."; // l10n later
}
}).bind(this));
return browser;
},

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml
index e0fcce367abe57e03e54779437facbba4326687b..7d57f10cfe6bd8435e45f0ffc806bd76b475e403 100644
index e0fcce367abe57e03e54779437facbba4326687b..70ef3cf15e9384f05e76d0768efb07872d4b69cf 100644
--- a/browser/base/content/aboutDialog.xhtml
+++ b/browser/base/content/aboutDialog.xhtml
@@ -36,6 +36,7 @@
@@ -10,3 +10,20 @@ index e0fcce367abe57e03e54779437facbba4326687b..7d57f10cfe6bd8435e45f0ffc806bd76
</linkset>
<html:div id="aboutDialogContainer">
@@ -134,13 +135,15 @@
</description>
</vbox>
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2">
- <label is="text-link" href="https://www.mozilla.org/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="community-mozillaLink"/>
+ <label is="text-link" href="https://github.com/zen-browser/desktop" data-l10n-name="community-mozillaLink"/>
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/>
</description>
+#if 0
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">
<label is="text-link" href="https://donate.mozilla.org/?utm_source=firefox&#38;utm_medium=referral&#38;utm_campaign=firefox_about&#38;utm_content=firefox_about" data-l10n-name="helpus-donateLink"/>
<label is="text-link" href="https://www.mozilla.org/contribute/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="helpus-getInvolvedLink"/>
</description>
+#endif
</vbox>
</vbox>
</hbox>

View File

@@ -5,6 +5,6 @@
</toolbarbutton>
<toolbarbutton class="toolbarbutton-1 zen-sidebar-action-button" id="zen-sidepanel-button" data-l10n-id="sidebar-zen-sidepanel" onclick="gZenBrowserManagerSidebar.toggle();"></toolbarbutton>
<toolbarbutton class="toolbarbutton-1 zen-sidebar-action-button" id="zen-bookmark-button" data-l10n-id="sidebar-menu-bookmarks" onclick="SidebarUI.show('viewBookmarksSidebar');"></toolbarbutton>
<toolbarbutton class="toolbarbutton-1 zen-sidebar-action-button" id="zen-history-button" data-l10n-id="sidebar-menu-history" onclick="SidebarUI.show('viewHistorySidebar');"></toolbarbutton>
<toolbarbutton class="toolbarbutton-1 zen-sidebar-action-button" id="zen-history-button" data-l10n-id="sidebar-menu-history" oncommand="PanelUI.showSubView('PanelUI-history', this);"></toolbarbutton>
<toolbarbutton class="toolbarbutton-1 zen-sidebar-action-button" id="zen-preferences-button" data-l10n-id="toolbar-settings-button" onclick="event.target.ownerGlobal.openPreferences(undefined);"></toolbarbutton>
</toolbar>

View File

@@ -1,12 +1,18 @@
<box id="zen-sidebar-web-panel-wrapper">
<box id="zen-sidebar-web-panel" class="chromeclass-extrachrome">
<box id="zen-sidebar-web-panel" class="chromeclass-extrachrome" hidden="true">
<toolbar mode="icons" flex="1" id="zen-sidebar-web-header">
<toolbarbutton id="zen-sidebar-web-panel-back" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.back();"/>
<toolbarbutton id="zen-sidebar-web-panel-forward" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.forward();"/>
<toolbarbutton id="zen-sidebar-web-panel-reload" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.reload();"/>
<toolbarbutton id="zen-sidebar-web-panel-home" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.home();"/>
<toolbarbutton id="zen-sidebar-web-panel-pinned" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.togglePinned(this);"/>
<toolbarbutton id="zen-sidebar-web-panel-close" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.close();"/>
<hbox>
<toolbarbutton id="zen-sidebar-web-panel-back" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.back();"/>
<toolbarbutton id="zen-sidebar-web-panel-forward" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.forward();"/>
<toolbarbutton id="zen-sidebar-web-panel-reload" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.reload();"/>
</hbox>
<hbox id="zen-sidebar-web-panel-title" flex="1">
</hbox>
<hbox>
<toolbarbutton id="zen-sidebar-web-panel-home" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.home();"/>
<toolbarbutton id="zen-sidebar-web-panel-pinned" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.togglePinned(this);"/>
<toolbarbutton id="zen-sidebar-web-panel-close" class="toolbarbutton-1 chromeclass-toolbar-additional" oncommand="gZenBrowserManagerSidebar.close();"/>
</hbox>
</toolbar>
<vbox id="zen-sidebar-web-panel-browser-containers">
</vbox>

View File

@@ -152,15 +152,19 @@
color-scheme: var(--toolbar-color-scheme);
}
#zen-sidebar-web-header {
justify-content: space-between;
}
#zen-sidebar-web-header toolbarbutton {
opacity: 0.7;
}
#zen-sidebar-panels-wrapper {
border-top-width: 1px !important;
border-bottom-width: 0px !important;
}
#zen-sidebar-web-panel-pinned {
margin-left: auto !important;
}
#zen-sidebar-web-panel-browser-containers {
height: 100%;
position: relative;
@@ -169,3 +173,17 @@
#zen-sidebar-web-panel browser[zen-sidebar-id] {
height: 100%;
}
#zen-sidebar-web-panel-title {
font-size: 1em;
font-weight: 600;
margin: 0 10px;
padding: 0;
color: var(--text-color-deemphasized);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: -moz-available;
text-align: center;
display: block;
}

View File

@@ -25,7 +25,7 @@
--zen-colors-hover-bg: color-mix(in srgb, var(--zen-primary-color) 90%, white 10%);
--zen-colors-primary-foreground: color-mix(in srgb, var(--zen-primary-color) 80%, black 20%);
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 70%, black 30%);
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 90%, black 10%);
--zen-colors-input-bg: color-mix(in srgb, var(--zen-primary-color) 10%, white 80%);
@@ -81,6 +81,7 @@
--zen-colors-primary-foreground: color-mix(in srgb, var(--zen-primary-color) 80%, white 20%);
--zen-colors-input-bg: color-mix(in srgb, var(--zen-primary-color) 10%, black 80%);
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 70%, black 30%);
--zen-dialog-background: color-mix(in srgb, var(--zen-primary-color) 10%, black 90%);
--zen-urlbar-background: color-mix(in srgb, var(--zen-primary-color) 8%, black 92%);

View File

@@ -303,7 +303,7 @@ toolbarseparator, menuseparator {
justify-content: center;
align-items: center;
margin: 16px;
background: light-dark(#fff, rgba(255,255,255,.2));
background: light-dark(#fff, rgba(255,255,255,.1));
}
#editBookmarkPanel::part(content) {