mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-30 15:08:40 +00:00
Enhance Zen animations and glance functionality with improved styles and closing behavior
This commit is contained in:
@@ -256,7 +256,7 @@
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 87%;
|
||||
height: 87%;
|
||||
height: calc(102% + 10px);
|
||||
}
|
||||
|
||||
100% {
|
||||
@@ -264,7 +264,7 @@
|
||||
transform: translate(-50%, -50%) translateZ(0);
|
||||
opacity: 1;
|
||||
width: 85%;
|
||||
height: 85%;
|
||||
height: calc(100% + 10px);
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
}
|
||||
@@ -287,7 +287,7 @@
|
||||
transform: translate(-50%, -50%);
|
||||
opacity: 1;
|
||||
width: 85%;
|
||||
height: 85%;
|
||||
height: calc(100% + 10px);
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
}
|
||||
|
@@ -9,11 +9,11 @@
|
||||
}
|
||||
|
||||
#tabbrowser-tabpanels:has(.zen-glance-background) {
|
||||
transform: scale(0.99);
|
||||
transform: scale(0.97);
|
||||
backdrop-filter: blur(5px);
|
||||
|
||||
& .zen-glance-background {
|
||||
opacity: 0.8;
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.1s ease-in-out;
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@
|
||||
opacity: 1;
|
||||
|
||||
& .browserContainer {
|
||||
animation: zen-glance-content-animation-out .3s ease-in-out forwards !important;
|
||||
animation: zen-glance-content-animation-out .2s ease-in-out forwards !important;
|
||||
animation-direction: reverse !important;
|
||||
|
||||
& browser {
|
||||
@@ -66,7 +66,7 @@
|
||||
transition: 0s !important;
|
||||
transform: none !important;
|
||||
margin: auto !important;
|
||||
top: 0 !important;
|
||||
top: -5px !important;
|
||||
left: 0 !important;
|
||||
}
|
||||
|
||||
@@ -105,13 +105,13 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 1;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
transition-delay: 0.2s;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
transition-delay: 0.1s;
|
||||
}
|
||||
|
||||
&[animate-full='true'] {
|
||||
opacity: 1;
|
||||
animation: zen-glance-buttons-animation-full 0.3s ease-in-out forwards !important;
|
||||
animation: zen-glance-buttons-animation-full 0.2s ease-in-out forwards !important;
|
||||
|
||||
& #zen-glance-sidebar-container {
|
||||
opacity: 0 !important;
|
||||
@@ -119,7 +119,7 @@
|
||||
}
|
||||
|
||||
&[animate='true'] {
|
||||
animation: zen-glance-content-animation .4s ease-in-out forwards;
|
||||
animation: zen-glance-content-animation .3s ease-in-out forwards;
|
||||
animation-delay: 0.1s;
|
||||
|
||||
&:not([animate-end='true']) {
|
||||
|
@@ -189,6 +189,7 @@
|
||||
this.contentWrapper = null;
|
||||
|
||||
this.lastCurrentTab.removeAttribute("zen-glance-tab");
|
||||
this.lastCurrentTab._closingGlance = true;
|
||||
|
||||
gBrowser.tabContainer._invalidateCachedTabs();
|
||||
gBrowser.removeTab(this.lastCurrentTab, { animate: true });
|
||||
|
@@ -56,9 +56,14 @@ export class ZenGlanceChild extends JSWindowActorChild {
|
||||
}
|
||||
|
||||
openGlance(target) {
|
||||
let url = target.href;
|
||||
// Add domain to relative URLs
|
||||
if (!url.match(/^(?:[a-z]+:)?\/\//i)) {
|
||||
url = this.contentWindow.location.origin + url;
|
||||
}
|
||||
const rect = target.getBoundingClientRect();
|
||||
this.sendAsyncMessage('ZenGlance:OpenGlance', {
|
||||
url: target.href,
|
||||
url,
|
||||
x: rect.left,
|
||||
y: rect.top,
|
||||
width: rect.width,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..af0f2a13e957331d48643fe4430408924c55b08c 100644
|
||||
index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..d2cd8709007b6d36b055ffff45b103a55f8656ee 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -462,11 +462,26 @@
|
||||
@@ -195,6 +195,15 @@ index 14de79b543cf07b04d06ef5a3f94d9aa988ea39a..af0f2a13e957331d48643fe443040892
|
||||
if (
|
||||
!this._beginRemoveTab(aTab, {
|
||||
closeWindowFastpath: true,
|
||||
@@ -4311,7 +4384,7 @@
|
||||
|
||||
var closeWindow = false;
|
||||
var newTab = false;
|
||||
- if (aTab.visible && this.visibleTabs.length == 1) {
|
||||
+ if (aTab.visible && this.visibleTabs.length == 1 && !aTab._closingGlance) {
|
||||
closeWindow =
|
||||
closeWindowWithLastTab != null
|
||||
? closeWindowWithLastTab
|
||||
@@ -5123,10 +5196,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
},
|
||||
|
Reference in New Issue
Block a user