mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-16 23:06:30 +00:00
Merge branch 'dev' into new-color-picker
This commit is contained in:
@@ -10,6 +10,8 @@ var gZenUIManager = {
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, 'contentElementSeparation', 'zen.theme.content-element-separation', 0);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, 'urlbarWaitToClear', 'zen.urlbar.wait-to-clear', 0);
|
||||
|
||||
gURLBar._zenTrimURL = this.urlbarTrim.bind(this);
|
||||
|
||||
ChromeUtils.defineLazyGetter(this, 'motion', () => {
|
||||
return ChromeUtils.importESModule('chrome://browser/content/zen-vendor/motion.min.mjs', { global: 'current' });
|
||||
});
|
||||
@@ -151,6 +153,8 @@ var gZenUIManager = {
|
||||
this.__currentPopupTrackElement = null;
|
||||
},
|
||||
|
||||
// Section: URL bar
|
||||
|
||||
get newtabButtons() {
|
||||
return document.querySelectorAll('#tabs-newtab-button');
|
||||
},
|
||||
@@ -214,6 +218,14 @@ var gZenUIManager = {
|
||||
}
|
||||
},
|
||||
|
||||
urlbarTrim(aURL) {
|
||||
if (gZenVerticalTabsManager._hasSetSingleToolbar) {
|
||||
let url = BrowserUIUtils.removeSingleTrailingSlashFromURL(aURL);
|
||||
return url.startsWith('http://') || url.startsWith('https://') ? url.split('/')[2] : url;
|
||||
}
|
||||
return BrowserUIUtils.trimURL(aURL);
|
||||
},
|
||||
|
||||
// Section: Notification messages
|
||||
_createToastElement(messageId, options) {
|
||||
const element = document.createXULElement('vbox');
|
||||
@@ -234,7 +246,7 @@ var gZenUIManager = {
|
||||
const toast = this._createToastElement(messageId, options);
|
||||
this._toastContainer.removeAttribute('hidden');
|
||||
this._toastContainer.appendChild(toast);
|
||||
await this.motion.animate(toast, { opacity: [0, 1], scale: [0.8, 1] }, { type: 'spring', duration: 0.3 });
|
||||
await this.motion.animate(toast, { opacity: [0, 1], scale: [0.8, 1] }, { type: 'spring', bounce: 0.4 });
|
||||
await new Promise((resolve) => setTimeout(resolve, 3000));
|
||||
await this.motion.animate(toast, { opacity: [1, 0], scale: [1, 0.9] }, { duration: 0.2, bounce: 0 });
|
||||
const toastHeight = toast.getBoundingClientRect().height;
|
||||
|
@@ -132,8 +132,9 @@
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
.urlbar-page-action:not([open]),
|
||||
.identity-box-button:not([open]),
|
||||
#tracking-protection-icon-container {
|
||||
margin-inline-end: calc(-14px - 2 * var(--urlbar-icon-padding)) !important;
|
||||
margin-inline-end: calc(-8px - 2 * var(--urlbar-icon-padding)) !important;
|
||||
opacity: 0;
|
||||
transition: all 0.1s ease;
|
||||
}
|
||||
@@ -142,9 +143,10 @@
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
#urlbar[open] :is(#tracking-protection-icon-container, .urlbar-page-action),
|
||||
#urlbar:hover :is(#tracking-protection-icon-container, .urlbar-page-action),
|
||||
#urlbar[open] :is(#tracking-protection-icon-container, .urlbar-page-action, .identity-box-button),
|
||||
#urlbar:hover :is(#tracking-protection-icon-container, .urlbar-page-action, .identity-box-button),
|
||||
.urlbar-page-action[open],
|
||||
.identity-box-button[open],
|
||||
#tracking-protection-icon-container[open] {
|
||||
opacity: 1;
|
||||
margin-inline-end: 0 !important;
|
||||
|
Reference in New Issue
Block a user