Skip to content

Commit c2d484a

Browse files
committed
fix: Fixed a bunch of small styling issues, b=(no-bug), c=common, compact-mode
1 parent 7ca3a9e commit c2d484a

File tree

7 files changed

+30
-21
lines changed

7 files changed

+30
-21
lines changed

src/zen/common/ZenCustomizableUI.sys.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export var ZenCustomizableUI = new (class {
122122

123123
_hideToolbarButtons(window) {
124124
const wrapper = window.document.getElementById('zen-sidebar-bottom-buttons');
125-
const elementsToHide = ['alltabs-button', 'new-tab-button'];
125+
const elementsToHide = ['new-tab-button'];
126126
for (let id of elementsToHide) {
127127
const elem = window.document.getElementById(id);
128128
if (elem) {

src/zen/common/ZenUIManager.mjs

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,27 @@ var gZenUIManager = {
416416

417417
// Section: Notification messages
418418
_createToastElement(messageId, options) {
419+
const createButton = () => {
420+
const button = document.createXULElement('button');
421+
button.id = options.button.id;
422+
button.classList.add('footer-button');
423+
button.classList.add('primary');
424+
button.addEventListener('command', options.button.command);
425+
return button;
426+
};
427+
419428
// Check if this message ID already exists
420429
for (const child of this._toastContainer.children) {
421430
if (child._messageId === messageId) {
422-
if (options.button && child.querySelector('button')) {
423-
const button = child.querySelector('button');
424-
const clone = button.cloneNode(true);
425-
button.replaceWith(clone);
426-
clone.addEventListener('command', options.button.command);
431+
child.removeAttribute('button');
432+
if (options.button) {
433+
const button = createButton();
434+
const existingButton = child.querySelector('button');
435+
if (existingButton) {
436+
existingButton.remove();
437+
}
438+
child.appendChild(button);
439+
child.setAttribute('button', true);
427440
}
428441
return [child, true];
429442
}
@@ -441,11 +454,7 @@ var gZenUIManager = {
441454
}
442455
wrapper.appendChild(element);
443456
if (options.button) {
444-
const button = document.createXULElement('button');
445-
button.id = options.button.id;
446-
button.classList.add('footer-button');
447-
button.classList.add('primary');
448-
button.addEventListener('command', options.button.command);
457+
const button = createButton();
449458
wrapper.appendChild(button);
450459
wrapper.setAttribute('button', true);
451460
}

src/zen/common/styles/zen-popup.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,15 @@ menuitem {
373373
gap: 10px;
374374
z-index: 1000;
375375
padding: var(--zen-toast-padding);
376-
border-radius: 14px;
376+
border-radius: calc(var(--zen-native-inner-radius) + 6px);
377377
background: linear-gradient(
378378
170deg,
379379
var(--zen-primary-color) -40%,
380380
color-mix(in srgb, var(--zen-primary-color) 85%, #0f0f0f 15%)
381381
);
382382
color: var(--button-primary-color);
383383
box-shadow: 0 0 14px 3px rgba(0, 0, 0, 0.05);
384-
border: 1px solid rgba(0, 0, 0, 0.1);
384+
border: 1px solid light-dark(rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.2));
385385
display: flex;
386386
font-weight: 600;
387387
align-items: center;
@@ -408,7 +408,7 @@ menuitem {
408408
padding: 0 12px !important;
409409
min-width: unset !important;
410410
margin: 0px !important;
411-
border-radius: 8px !important;
411+
border-radius: var(--zen-native-inner-radius) !important;
412412

413413
:root[zen-right-side='true'] & {
414414
order: -1;

src/zen/common/styles/zen-sidebar.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#zen-tabbox-wrapper {
99
& #sidebar-splitter {
1010
opacity: 0;
11-
margin: 0 calc(-1 * var(--zen-element-separation));
11+
margin: 0 calc(-1 * var(--zen-element-separation) + 2px);
1212
}
1313

1414
& #sidebar-box {
@@ -27,11 +27,11 @@
2727

2828
& #tabbrowser-tabbox[sidebar-positionend] {
2929
& #sidebar-box {
30-
order: 7 !important;
30+
order: 8 !important;
3131
}
3232

3333
& #sidebar-splitter {
34-
order: 6 !important;
34+
order: 7 !important;
3535
}
3636
}
3737
}

src/zen/common/styles/zen-urlbar.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
--zen-urlbar-background-transparent,
176176
var(--zen-urlbar-background-base)
177177
) !important;
178-
box-shadow: 0px 0px 10rem -2px rgba(0, 0, 0, 0.9) !important;
178+
box-shadow: 0px 0px 90px -10px rgba(0, 0, 0, 0.6) !important;
179179
backdrop-filter: none !important;
180180
border-radius: 12px !important;
181181
outline: 0.5px solid light-dark(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.15)) !important;

src/zen/compact-mode/zen-compact-mode.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@
299299
visibility: visible;
300300
}
301301

302-
left: calc(var(--zen-element-separation) / -2);
302+
left: calc(var(--zen-element-separation) / -2 - 1px);
303303
:root[zen-right-side='true'] & {
304-
right: calc(var(--zen-element-separation) / -2);
304+
right: calc(var(--zen-element-separation) / -2 - 1px);
305305
left: auto;
306306
}
307307
}

surfer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"brandShortName": "Zen",
2020
"brandFullName": "Zen Browser",
2121
"release": {
22-
"displayVersion": "1.12.4b",
22+
"displayVersion": "1.12.5b",
2323
"github": {
2424
"repo": "zen-browser/desktop"
2525
},

0 commit comments

Comments
 (0)