mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-15 14:26:12 +00:00
fix: Fixed a bunch of small styling issues, b=(no-bug), c=common, compact-mode
This commit is contained in:
@@ -122,7 +122,7 @@ export var ZenCustomizableUI = new (class {
|
|||||||
|
|
||||||
_hideToolbarButtons(window) {
|
_hideToolbarButtons(window) {
|
||||||
const wrapper = window.document.getElementById('zen-sidebar-bottom-buttons');
|
const wrapper = window.document.getElementById('zen-sidebar-bottom-buttons');
|
||||||
const elementsToHide = ['alltabs-button', 'new-tab-button'];
|
const elementsToHide = ['new-tab-button'];
|
||||||
for (let id of elementsToHide) {
|
for (let id of elementsToHide) {
|
||||||
const elem = window.document.getElementById(id);
|
const elem = window.document.getElementById(id);
|
||||||
if (elem) {
|
if (elem) {
|
||||||
|
@@ -416,14 +416,27 @@ var gZenUIManager = {
|
|||||||
|
|
||||||
// Section: Notification messages
|
// Section: Notification messages
|
||||||
_createToastElement(messageId, options) {
|
_createToastElement(messageId, options) {
|
||||||
|
const createButton = () => {
|
||||||
|
const button = document.createXULElement('button');
|
||||||
|
button.id = options.button.id;
|
||||||
|
button.classList.add('footer-button');
|
||||||
|
button.classList.add('primary');
|
||||||
|
button.addEventListener('command', options.button.command);
|
||||||
|
return button;
|
||||||
|
};
|
||||||
|
|
||||||
// Check if this message ID already exists
|
// Check if this message ID already exists
|
||||||
for (const child of this._toastContainer.children) {
|
for (const child of this._toastContainer.children) {
|
||||||
if (child._messageId === messageId) {
|
if (child._messageId === messageId) {
|
||||||
if (options.button && child.querySelector('button')) {
|
child.removeAttribute('button');
|
||||||
const button = child.querySelector('button');
|
if (options.button) {
|
||||||
const clone = button.cloneNode(true);
|
const button = createButton();
|
||||||
button.replaceWith(clone);
|
const existingButton = child.querySelector('button');
|
||||||
clone.addEventListener('command', options.button.command);
|
if (existingButton) {
|
||||||
|
existingButton.remove();
|
||||||
|
}
|
||||||
|
child.appendChild(button);
|
||||||
|
child.setAttribute('button', true);
|
||||||
}
|
}
|
||||||
return [child, true];
|
return [child, true];
|
||||||
}
|
}
|
||||||
@@ -441,11 +454,7 @@ var gZenUIManager = {
|
|||||||
}
|
}
|
||||||
wrapper.appendChild(element);
|
wrapper.appendChild(element);
|
||||||
if (options.button) {
|
if (options.button) {
|
||||||
const button = document.createXULElement('button');
|
const button = createButton();
|
||||||
button.id = options.button.id;
|
|
||||||
button.classList.add('footer-button');
|
|
||||||
button.classList.add('primary');
|
|
||||||
button.addEventListener('command', options.button.command);
|
|
||||||
wrapper.appendChild(button);
|
wrapper.appendChild(button);
|
||||||
wrapper.setAttribute('button', true);
|
wrapper.setAttribute('button', true);
|
||||||
}
|
}
|
||||||
|
@@ -373,7 +373,7 @@ menuitem {
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
padding: var(--zen-toast-padding);
|
padding: var(--zen-toast-padding);
|
||||||
border-radius: 14px;
|
border-radius: calc(var(--zen-native-inner-radius) + 6px);
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
170deg,
|
170deg,
|
||||||
var(--zen-primary-color) -40%,
|
var(--zen-primary-color) -40%,
|
||||||
@@ -381,7 +381,7 @@ menuitem {
|
|||||||
);
|
);
|
||||||
color: var(--button-primary-color);
|
color: var(--button-primary-color);
|
||||||
box-shadow: 0 0 14px 3px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 0 14px 3px rgba(0, 0, 0, 0.05);
|
||||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
border: 1px solid light-dark(rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.2));
|
||||||
display: flex;
|
display: flex;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -408,7 +408,7 @@ menuitem {
|
|||||||
padding: 0 12px !important;
|
padding: 0 12px !important;
|
||||||
min-width: unset !important;
|
min-width: unset !important;
|
||||||
margin: 0px !important;
|
margin: 0px !important;
|
||||||
border-radius: 8px !important;
|
border-radius: var(--zen-native-inner-radius) !important;
|
||||||
|
|
||||||
:root[zen-right-side='true'] & {
|
:root[zen-right-side='true'] & {
|
||||||
order: -1;
|
order: -1;
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
#zen-tabbox-wrapper {
|
#zen-tabbox-wrapper {
|
||||||
& #sidebar-splitter {
|
& #sidebar-splitter {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
margin: 0 calc(-1 * var(--zen-element-separation));
|
margin: 0 calc(-1 * var(--zen-element-separation) + 2px);
|
||||||
}
|
}
|
||||||
|
|
||||||
& #sidebar-box {
|
& #sidebar-box {
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
|
|
||||||
& #tabbrowser-tabbox[sidebar-positionend] {
|
& #tabbrowser-tabbox[sidebar-positionend] {
|
||||||
& #sidebar-box {
|
& #sidebar-box {
|
||||||
order: 7 !important;
|
order: 8 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
& #sidebar-splitter {
|
& #sidebar-splitter {
|
||||||
order: 6 !important;
|
order: 7 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -175,7 +175,7 @@
|
|||||||
--zen-urlbar-background-transparent,
|
--zen-urlbar-background-transparent,
|
||||||
var(--zen-urlbar-background-base)
|
var(--zen-urlbar-background-base)
|
||||||
) !important;
|
) !important;
|
||||||
box-shadow: 0px 0px 10rem -2px rgba(0, 0, 0, 0.9) !important;
|
box-shadow: 0px 0px 90px -10px rgba(0, 0, 0, 0.6) !important;
|
||||||
backdrop-filter: none !important;
|
backdrop-filter: none !important;
|
||||||
border-radius: 12px !important;
|
border-radius: 12px !important;
|
||||||
outline: 0.5px solid light-dark(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.15)) !important;
|
outline: 0.5px solid light-dark(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.15)) !important;
|
||||||
|
@@ -299,9 +299,9 @@
|
|||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
left: calc(var(--zen-element-separation) / -2);
|
left: calc(var(--zen-element-separation) / -2 - 1px);
|
||||||
:root[zen-right-side='true'] & {
|
:root[zen-right-side='true'] & {
|
||||||
right: calc(var(--zen-element-separation) / -2);
|
right: calc(var(--zen-element-separation) / -2 - 1px);
|
||||||
left: auto;
|
left: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
"brandShortName": "Zen",
|
"brandShortName": "Zen",
|
||||||
"brandFullName": "Zen Browser",
|
"brandFullName": "Zen Browser",
|
||||||
"release": {
|
"release": {
|
||||||
"displayVersion": "1.12.4b",
|
"displayVersion": "1.12.5b",
|
||||||
"github": {
|
"github": {
|
||||||
"repo": "zen-browser/desktop"
|
"repo": "zen-browser/desktop"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user