mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 01:16:35 +00:00
Fix toolbar button behavior and enhance URL bar styles for floating mode
This commit is contained in:
@@ -379,7 +379,7 @@ var gZenVerticalTabsManager = {
|
||||
}
|
||||
|
||||
// Case: single toolbar, not compact mode, not right side and macos styled buttons
|
||||
if (doNotChangeWindowButtons && isSingleToolbar && !isCompactMode && !isRightSide && !this.isWindowsStyledButtons) {
|
||||
if (!doNotChangeWindowButtons && isSingleToolbar && !isCompactMode && !isRightSide && !this.isWindowsStyledButtons) {
|
||||
topButtons.prepend(windowButtons);
|
||||
}
|
||||
|
||||
|
@@ -4,6 +4,10 @@ height: var(--zen-toolbar-height);
|
||||
& {
|
||||
transition: height 0.2s ease, opacity 0.2s ease-out;
|
||||
transition-delay: 0.05s;
|
||||
|
||||
& > * {
|
||||
transition: transform 0.4s ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
&:not([zen-has-hover='true']):not([has-popup-menu]):not(:focus-within) {
|
||||
@@ -12,6 +16,7 @@ height: var(--zen-toolbar-height);
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
& > * {
|
||||
transform: translateY(-100%);
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
@@ -338,9 +338,6 @@ button.popup-notification-dropmarker {
|
||||
}
|
||||
|
||||
#urlbar[open] {
|
||||
--urlbar-container-height: 55px !important;
|
||||
--urlbar-margin-inline: 10px !important;
|
||||
font-size: 1.1em;
|
||||
|
||||
& #urlbar-background {
|
||||
/* We cant have a transparent background with a backdrop-filter because on normal websites,
|
||||
@@ -354,13 +351,16 @@ button.popup-notification-dropmarker {
|
||||
}
|
||||
|
||||
:root[zen-single-toolbar='true'] #urlbar[open] {
|
||||
min-width: 45vw;
|
||||
min-width: 30vw;
|
||||
}
|
||||
|
||||
#urlbar[open][zen-floating-urlbar='true'] {
|
||||
z-index: 1000;
|
||||
max-width: 45vw;
|
||||
top: 0 !important;
|
||||
min-width: 45vw !important;
|
||||
font-size: 1.1em;
|
||||
--urlbar-container-height: 55px !important;
|
||||
--urlbar-margin-inline: 10px !important;
|
||||
|
||||
& #identity-box {
|
||||
margin-right: var(--urlbar-margin-inline);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
index c504c9afc43785b5f003bb1f9f1dfbddef38d78b..289a9dfdc2fd38f7d7c3571732e3897aa978d8d9 100644
|
||||
index c504c9afc43785b5f003bb1f9f1dfbddef38d78b..f4167cf9f3dcbbb8666118436e9f79137caf565a 100644
|
||||
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
@@ -65,6 +65,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
@@ -31,7 +31,7 @@ index c504c9afc43785b5f003bb1f9f1dfbddef38d78b..289a9dfdc2fd38f7d7c3571732e3897a
|
||||
}
|
||||
|
||||
_on_click(event) {
|
||||
+ if (lazy.ZEN_URLBAR_BEHAVIOR === 'float') {
|
||||
+ if (lazy.ZEN_URLBAR_BEHAVIOR === 'float' && event.target == this.inputField) {
|
||||
+ event.zenOriginalTarget = this.textbox;
|
||||
+ this._on_mousedown(event);
|
||||
+ }
|
||||
@@ -58,7 +58,7 @@ index c504c9afc43785b5f003bb1f9f1dfbddef38d78b..289a9dfdc2fd38f7d7c3571732e3897a
|
||||
|
||||
- this.focusedViaMousedown = !this.focused;
|
||||
- this._preventClickSelectsAll = this.focused;
|
||||
+ this.focusedViaMousedown = !(lazy.ZEN_URLBAR_BEHAVIOR === 'float' ? this.hasAttribute("breakout-extend") : this.focused);
|
||||
+ this.focusedViaMousedown = !(lazy.ZEN_URLBAR_BEHAVIOR === 'default' ? this.focused : this.hasAttribute("breakout-extend"));
|
||||
+ this._preventClickSelectsAll = lazy.ZEN_URLBAR_BEHAVIOR === 'default' ? this.focused : this.hasAttribute("breakout-extend");
|
||||
|
||||
// Keep the focus status, since the attribute may be changed
|
||||
|
Reference in New Issue
Block a user