mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-10 05:35:29 +02:00
Rename workspace select button to workspaces button and update related styles for consistency
This commit is contained in:
parent
0f446a5435
commit
ba435d9c14
12 changed files with 29 additions and 29 deletions
|
@ -109,6 +109,7 @@ pref('zen.theme.border-radius', 12); // In pixels
|
|||
#else
|
||||
pref('zen.theme.border-radius', 8); // In pixels
|
||||
#endif
|
||||
#endif
|
||||
|
||||
pref('zen.theme.color-prefs.use-workspace-colors', true);
|
||||
pref('zen.theme.color-prefs.amoled', false);
|
||||
|
|
|
@ -4,7 +4,7 @@ export var ZenCustomizableUI = new (class {
|
|||
constructor() {}
|
||||
|
||||
TYPE_TOOLBAR = 'toolbar';
|
||||
defaultSidebarIcons = ['zen-profile-button', 'zen-workspace-select-button', 'downloads-button'];
|
||||
defaultSidebarIcons = ['zen-profile-button', 'zen-workspaces-button', 'downloads-button'];
|
||||
|
||||
startup(CustomizableUIInternal) {
|
||||
CustomizableUIInternal.registerArea(
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
mode="icons">
|
||||
<toolbarbutton removable="true" class="chromeclass-toolbar-additional toolbarbutton-1 zen-sidebar-action-button" id="zen-expand-sidebar-button" data-l10n-id="sidebar-zen-expand" cui-areatype="toolbar" oncommand="gZenVerticalTabsManager.toggleExpand();"></toolbarbutton>
|
||||
<toolbarbutton removable="true" class="toolbarbutton-1 zen-sidebar-action-button zen-compact-mode-ignore" id="zen-sidepanel-button" data-l10n-id="sidebar-zen-sidepanel" onclick="gZenBrowserManagerSidebar.toggle();"></toolbarbutton>
|
||||
<toolbarbutton removable="false" id="zen-workspace-select-button"></toolbarbutton>
|
||||
<toolbarbutton removable="false" id="zen-workspaces-button"></toolbarbutton>
|
||||
<toolbarbutton id="zen-profile-button"
|
||||
class="zen-sidebar-action-button toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
delegatesanchor="true"
|
||||
|
|
|
@ -20,7 +20,7 @@ xul|button {
|
|||
border: 1px solid var(--zen-colors-border);
|
||||
}
|
||||
|
||||
button:not(#zen-workspace-select-button):active {
|
||||
button:not(#zen-workspaces-button):active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
|
||||
#navigator-toolbox:not([animate='true']) #titlebar {
|
||||
box-shadow: var(--zen-big-shadow);
|
||||
border-radius: calc(var(--zen-native-inner-radius) + 2px);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
padding: var(--zen-toolbox-padding) !important;
|
||||
position: relative;
|
||||
background: var(--zen-dialog-background);
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
pointer-events: none;
|
||||
}
|
||||
|
||||
#zen-workspace-select-button .zen-workspace-sidebar-name {
|
||||
#zen-workspaces-button .zen-workspace-sidebar-name {
|
||||
margin-left: 10px;
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -321,7 +321,7 @@
|
|||
|
||||
padding-top: var(--zen-element-separation);
|
||||
|
||||
& > toolbarbutton:not(#zen-workspace-select-button) {
|
||||
& > toolbarbutton:not(#zen-workspaces-button) {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
@ -398,7 +398,7 @@
|
|||
margin-top: 0;
|
||||
}
|
||||
|
||||
& #zen-workspace-select-button[as-button='true'] {
|
||||
& #zen-workspaces-button[as-button='true'] {
|
||||
width: calc(100% - 10px) !important;
|
||||
}
|
||||
|
||||
|
@ -406,7 +406,7 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
& #zen-workspace-select-button {
|
||||
& #zen-workspaces-button {
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
|
||||
|
@ -453,7 +453,7 @@
|
|||
bottom: calc(-0.5 * var(--zen-toolbox-padding));
|
||||
}
|
||||
|
||||
& > *:not(tabs):not(#search-container):not(#zen-workspace-select-button),
|
||||
& > *:not(tabs):not(#search-container):not(#zen-workspaces-button),
|
||||
& #tabbrowser-arrowscrollbox-periphery > toolbarbutton {
|
||||
width: 100% !important;
|
||||
border-radius: var(--tab-border-radius) !important;
|
||||
|
@ -656,7 +656,7 @@
|
|||
margin-inline-end: 0 !important;
|
||||
}
|
||||
}
|
||||
& #zen-workspace-select-button {
|
||||
& #zen-workspaces-button {
|
||||
flex-direction: column;
|
||||
&:not([as-button='true']) {
|
||||
& toolbarbutton {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
@namespace html 'http://www.w3.org/1999/xhtml';
|
||||
|
||||
#zen-workspace-select-button {
|
||||
#zen-workspaces-button {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
@ -107,7 +107,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
#zen-workspace-select-button .zen-workspace-sidebar-wrapper {
|
||||
#zen-workspaces-button .zen-workspace-sidebar-wrapper {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
@ -116,7 +116,7 @@
|
|||
pointer-events: none;
|
||||
}
|
||||
|
||||
#zen-workspace-select-button .zen-workspace-sidebar-name {
|
||||
#zen-workspaces-button .zen-workspace-sidebar-name {
|
||||
margin-left: 0.2rem;
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
|
@ -127,18 +127,18 @@
|
|||
|
||||
/** Keep these selectors in sync with the ones in vertical-tabs.css */
|
||||
#navigator-toolbox {
|
||||
& #zen-workspace-select-button[as-button='true'] {
|
||||
& #zen-workspaces-button[as-button='true'] {
|
||||
width: calc(100% - var(--toolbarbutton-outer-padding));
|
||||
margin: 2px;
|
||||
min-width: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
|
||||
height: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
|
||||
}
|
||||
|
||||
& #zen-workspace-select-button .zen-workspace-sidebar-name {
|
||||
& #zen-workspaces-button .zen-workspace-sidebar-name {
|
||||
display: block;
|
||||
}
|
||||
|
||||
& #zen-workspace-select-button .zen-workspace-sidebar-icon {
|
||||
& #zen-workspaces-button .zen-workspace-sidebar-icon {
|
||||
margin-inline-end: 5px;
|
||||
|
||||
& [no-icon='true'] {
|
||||
|
@ -146,11 +146,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
& #zen-workspace-select-button .zen-workspace-sidebar-icon[no-icon='true'] + .zen-workspace-sidebar-name {
|
||||
& #zen-workspaces-button .zen-workspace-sidebar-icon[no-icon='true'] + .zen-workspace-sidebar-name {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
& #zen-workspace-select-button {
|
||||
& #zen-workspaces-button {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
|
|
@ -227,8 +227,8 @@ var gZenCompactModeManager = {
|
|||
updateContextMenu() {
|
||||
document.getElementById('zen-context-menu-compact-mode-toggle').setAttribute('checked', this.preference);
|
||||
|
||||
const hideTabBar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar');
|
||||
const hideToolbar = Services.prefs.getBoolPref('zen.view.compact.hide-toolbar');
|
||||
const hideTabBar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar', false);
|
||||
const hideToolbar = Services.prefs.getBoolPref('zen.view.compact.hide-toolbar', false);
|
||||
const hideBoth = hideTabBar && hideToolbar;
|
||||
|
||||
const idName = 'zen-context-menu-compact-mode-hide-';
|
||||
|
|
|
@ -879,7 +879,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
await this.changeWorkspace(workspace);
|
||||
let panel = this.ownerWindow.document.getElementById('PanelUI-zen-workspaces');
|
||||
PanelMultiView.hidePopup(panel);
|
||||
this.ownerWindow.document.getElementById('zen-workspace-select-button').removeAttribute('open');
|
||||
this.ownerWindow.document.getElementById('zen-workspaces-button').removeAttribute('open');
|
||||
}).bind(browser.ZenWorkspaces);
|
||||
return element;
|
||||
};
|
||||
|
@ -1025,8 +1025,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
if (!this.workspaceEnabled) {
|
||||
return;
|
||||
}
|
||||
let target =
|
||||
event.target.closest('#zen-current-workspace-indicator') || document.getElementById('zen-workspace-select-button');
|
||||
let target = event.target.closest('#zen-current-workspace-indicator') || document.getElementById('zen-workspaces-button');
|
||||
let panel = document.getElementById('PanelUI-zen-workspaces');
|
||||
await this._propagateWorkspaceData({
|
||||
ignoreStrip: true,
|
||||
|
@ -1041,8 +1040,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
async initializeWorkspacesButton() {
|
||||
if (!this.workspaceEnabled) {
|
||||
return;
|
||||
} else if (document.getElementById('zen-workspace-select-button')) {
|
||||
let button = document.getElementById('zen-workspace-select-button');
|
||||
} else if (document.getElementById('zen-workspaces-button')) {
|
||||
let button = document.getElementById('zen-workspaces-button');
|
||||
button.removeAttribute('hidden');
|
||||
return;
|
||||
}
|
||||
|
@ -1053,7 +1052,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
if (typeof browser.ZenWorkspaces === 'undefined') {
|
||||
browser = window;
|
||||
}
|
||||
let button = browser.document.getElementById('zen-workspace-select-button');
|
||||
let button = browser.document.getElementById('zen-workspaces-button');
|
||||
|
||||
while (button.firstChild) {
|
||||
button.firstChild.remove();
|
||||
|
|
|
@ -601,8 +601,8 @@ var gZenLooksAndFeel = {
|
|||
|
||||
let value = '';
|
||||
if (
|
||||
Services.prefs.getBoolPref('zen.view.compact.hide-tabbar') &&
|
||||
Services.prefs.getBoolPref('zen.view.compact.hide-toolbar')
|
||||
Services.prefs.getBoolPref('zen.view.compact.hide-tabbar', false) &&
|
||||
Services.prefs.getBoolPref('zen.view.compact.hide-toolbar', false)
|
||||
) {
|
||||
value = 'both';
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue