1
0
Fork 1
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:
mr. m 2025-01-20 21:35:46 +00:00
parent 0f446a5435
commit ba435d9c14
12 changed files with 29 additions and 29 deletions

View file

@ -109,6 +109,7 @@ pref('zen.theme.border-radius', 12); // In pixels
#else #else
pref('zen.theme.border-radius', 8); // In pixels pref('zen.theme.border-radius', 8); // In pixels
#endif #endif
#endif
pref('zen.theme.color-prefs.use-workspace-colors', true); pref('zen.theme.color-prefs.use-workspace-colors', true);
pref('zen.theme.color-prefs.amoled', false); pref('zen.theme.color-prefs.amoled', false);

View file

@ -4,7 +4,7 @@ export var ZenCustomizableUI = new (class {
constructor() {} constructor() {}
TYPE_TOOLBAR = 'toolbar'; TYPE_TOOLBAR = 'toolbar';
defaultSidebarIcons = ['zen-profile-button', 'zen-workspace-select-button', 'downloads-button']; defaultSidebarIcons = ['zen-profile-button', 'zen-workspaces-button', 'downloads-button'];
startup(CustomizableUIInternal) { startup(CustomizableUIInternal) {
CustomizableUIInternal.registerArea( CustomizableUIInternal.registerArea(

View file

@ -9,7 +9,7 @@
mode="icons"> 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="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="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" <toolbarbutton id="zen-profile-button"
class="zen-sidebar-action-button toolbarbutton-1 chromeclass-toolbar-additional" class="zen-sidebar-action-button toolbarbutton-1 chromeclass-toolbar-additional"
delegatesanchor="true" delegatesanchor="true"

View file

@ -20,7 +20,7 @@ xul|button {
border: 1px solid var(--zen-colors-border); border: 1px solid var(--zen-colors-border);
} }
button:not(#zen-workspace-select-button):active { button:not(#zen-workspaces-button):active {
transform: scale(0.98); transform: scale(0.98);
} }

View file

@ -100,7 +100,7 @@
#navigator-toolbox:not([animate='true']) #titlebar { #navigator-toolbox:not([animate='true']) #titlebar {
box-shadow: var(--zen-big-shadow); 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; padding: var(--zen-toolbox-padding) !important;
position: relative; position: relative;
background: var(--zen-dialog-background); background: var(--zen-dialog-background);

View file

@ -40,7 +40,7 @@
pointer-events: none; pointer-events: none;
} }
#zen-workspace-select-button .zen-workspace-sidebar-name { #zen-workspaces-button .zen-workspace-sidebar-name {
margin-left: 10px; margin-left: 10px;
display: none; display: none;
overflow: hidden; overflow: hidden;

View file

@ -321,7 +321,7 @@
padding-top: var(--zen-element-separation); padding-top: var(--zen-element-separation);
& > toolbarbutton:not(#zen-workspace-select-button) { & > toolbarbutton:not(#zen-workspaces-button) {
padding: 0 !important; padding: 0 !important;
} }
} }
@ -398,7 +398,7 @@
margin-top: 0; margin-top: 0;
} }
& #zen-workspace-select-button[as-button='true'] { & #zen-workspaces-button[as-button='true'] {
width: calc(100% - 10px) !important; width: calc(100% - 10px) !important;
} }
@ -406,7 +406,7 @@
display: none; display: none;
} }
& #zen-workspace-select-button { & #zen-workspaces-button {
margin-left: 2px; margin-left: 2px;
margin-right: 2px; margin-right: 2px;
@ -453,7 +453,7 @@
bottom: calc(-0.5 * var(--zen-toolbox-padding)); 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 { & #tabbrowser-arrowscrollbox-periphery > toolbarbutton {
width: 100% !important; width: 100% !important;
border-radius: var(--tab-border-radius) !important; border-radius: var(--tab-border-radius) !important;
@ -656,7 +656,7 @@
margin-inline-end: 0 !important; margin-inline-end: 0 !important;
} }
} }
& #zen-workspace-select-button { & #zen-workspaces-button {
flex-direction: column; flex-direction: column;
&:not([as-button='true']) { &:not([as-button='true']) {
& toolbarbutton { & toolbarbutton {

View file

@ -5,7 +5,7 @@
*/ */
@namespace html 'http://www.w3.org/1999/xhtml'; @namespace html 'http://www.w3.org/1999/xhtml';
#zen-workspace-select-button { #zen-workspaces-button {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
display: flex; display: flex;
@ -107,7 +107,7 @@
} }
} }
#zen-workspace-select-button .zen-workspace-sidebar-wrapper { #zen-workspaces-button .zen-workspace-sidebar-wrapper {
position: absolute; position: absolute;
width: 100%; width: 100%;
display: flex; display: flex;
@ -116,7 +116,7 @@
pointer-events: none; pointer-events: none;
} }
#zen-workspace-select-button .zen-workspace-sidebar-name { #zen-workspaces-button .zen-workspace-sidebar-name {
margin-left: 0.2rem; margin-left: 0.2rem;
display: none; display: none;
overflow: hidden; overflow: hidden;
@ -127,18 +127,18 @@
/** Keep these selectors in sync with the ones in vertical-tabs.css */ /** Keep these selectors in sync with the ones in vertical-tabs.css */
#navigator-toolbox { #navigator-toolbox {
& #zen-workspace-select-button[as-button='true'] { & #zen-workspaces-button[as-button='true'] {
width: calc(100% - var(--toolbarbutton-outer-padding)); width: calc(100% - var(--toolbarbutton-outer-padding));
margin: 2px; margin: 2px;
min-width: calc(2 * var(--toolbarbutton-inner-padding) + 16px); min-width: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
height: 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; display: block;
} }
& #zen-workspace-select-button .zen-workspace-sidebar-icon { & #zen-workspaces-button .zen-workspace-sidebar-icon {
margin-inline-end: 5px; margin-inline-end: 5px;
& [no-icon='true'] { & [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; margin-left: 0;
} }
& #zen-workspace-select-button { & #zen-workspaces-button {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;

View file

@ -227,8 +227,8 @@ var gZenCompactModeManager = {
updateContextMenu() { updateContextMenu() {
document.getElementById('zen-context-menu-compact-mode-toggle').setAttribute('checked', this.preference); document.getElementById('zen-context-menu-compact-mode-toggle').setAttribute('checked', this.preference);
const hideTabBar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar'); const hideTabBar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar', false);
const hideToolbar = Services.prefs.getBoolPref('zen.view.compact.hide-toolbar'); const hideToolbar = Services.prefs.getBoolPref('zen.view.compact.hide-toolbar', false);
const hideBoth = hideTabBar && hideToolbar; const hideBoth = hideTabBar && hideToolbar;
const idName = 'zen-context-menu-compact-mode-hide-'; const idName = 'zen-context-menu-compact-mode-hide-';

View file

@ -879,7 +879,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
await this.changeWorkspace(workspace); await this.changeWorkspace(workspace);
let panel = this.ownerWindow.document.getElementById('PanelUI-zen-workspaces'); let panel = this.ownerWindow.document.getElementById('PanelUI-zen-workspaces');
PanelMultiView.hidePopup(panel); 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); }).bind(browser.ZenWorkspaces);
return element; return element;
}; };
@ -1025,8 +1025,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
if (!this.workspaceEnabled) { if (!this.workspaceEnabled) {
return; return;
} }
let target = let target = event.target.closest('#zen-current-workspace-indicator') || document.getElementById('zen-workspaces-button');
event.target.closest('#zen-current-workspace-indicator') || document.getElementById('zen-workspace-select-button');
let panel = document.getElementById('PanelUI-zen-workspaces'); let panel = document.getElementById('PanelUI-zen-workspaces');
await this._propagateWorkspaceData({ await this._propagateWorkspaceData({
ignoreStrip: true, ignoreStrip: true,
@ -1041,8 +1040,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
async initializeWorkspacesButton() { async initializeWorkspacesButton() {
if (!this.workspaceEnabled) { if (!this.workspaceEnabled) {
return; return;
} else if (document.getElementById('zen-workspace-select-button')) { } else if (document.getElementById('zen-workspaces-button')) {
let button = document.getElementById('zen-workspace-select-button'); let button = document.getElementById('zen-workspaces-button');
button.removeAttribute('hidden'); button.removeAttribute('hidden');
return; return;
} }
@ -1053,7 +1052,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
if (typeof browser.ZenWorkspaces === 'undefined') { if (typeof browser.ZenWorkspaces === 'undefined') {
browser = window; browser = window;
} }
let button = browser.document.getElementById('zen-workspace-select-button'); let button = browser.document.getElementById('zen-workspaces-button');
while (button.firstChild) { while (button.firstChild) {
button.firstChild.remove(); button.firstChild.remove();

View file

@ -601,8 +601,8 @@ var gZenLooksAndFeel = {
let value = ''; let value = '';
if ( if (
Services.prefs.getBoolPref('zen.view.compact.hide-tabbar') && Services.prefs.getBoolPref('zen.view.compact.hide-tabbar', false) &&
Services.prefs.getBoolPref('zen.view.compact.hide-toolbar') Services.prefs.getBoolPref('zen.view.compact.hide-toolbar', false)
) { ) {
value = 'both'; value = 'both';
} else { } else {

View file

@ -53,4 +53,4 @@
"licenseType": "MPL-2.0" "licenseType": "MPL-2.0"
}, },
"updateHostname": "updates.zen-browser.app" "updateHostname": "updates.zen-browser.app"
} }