Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteVen Batten <6561887+sbatten@users.noreply.github.com>2022-05-11 06:44:15 +0300
committerGitHub <noreply@github.com>2022-05-11 06:44:15 +0300
commit0687ec84946e319432ce42649acaa6bc1c6030ee (patch)
treef9818afb4d6f2620ccbd0d683c262b0e53e9ce14
parentfc4119eb55f4e54b0cccaedf315d4409dff37e6a (diff)
adopt state variations of layout icons (#149200)
-rw-r--r--src/vs/workbench/browser/actions/layoutActions.ts10
-rw-r--r--src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.ts12
-rw-r--r--src/vs/workbench/browser/parts/panel/panelActions.ts7
3 files changed, 17 insertions, 12 deletions
diff --git a/src/vs/workbench/browser/actions/layoutActions.ts b/src/vs/workbench/browser/actions/layoutActions.ts
index 8440c0f8e12..8ace4020a72 100644
--- a/src/vs/workbench/browser/actions/layoutActions.ts
+++ b/src/vs/workbench/browser/actions/layoutActions.ts
@@ -34,7 +34,9 @@ const menubarIcon = registerIcon('menuBar', Codicon.layoutMenubar, localize('men
const activityBarLeftIcon = registerIcon('activity-bar-left', Codicon.layoutActivitybarLeft, localize('activityBarLeft', "Represents the activity bar in the left position"));
const activityBarRightIcon = registerIcon('activity-bar-right', Codicon.layoutActivitybarRight, localize('activityBarRight', "Represents the activity bar in the right position"));
const panelLeftIcon = registerIcon('panel-left', Codicon.layoutSidebarLeft, localize('panelLeft', "Represents a side bar in the left position"));
+const panelLeftOffIcon = registerIcon('panel-left-off', Codicon.layoutSidebarLeftOff, localize('panelLeftOff', "Represents a side bar in the left position toggled off"));
const panelRightIcon = registerIcon('panel-right', Codicon.layoutSidebarRight, localize('panelRight', "Represents side bar in the right position"));
+const panelRightOffIcon = registerIcon('panel-right-off', Codicon.layoutSidebarRightOff, localize('panelRightOff', "Represents side bar in the right position toggled off"));
const panelIcon = registerIcon('panel-bottom', Codicon.layoutPanel, localize('panelBottom', "Represents the bottom panel"));
const statusBarIcon = registerIcon('statusBar', Codicon.layoutStatusbar, localize('statusBarIcon', "Represents the status bar"));
@@ -427,8 +429,8 @@ MenuRegistry.appendMenuItems([
command: {
id: ToggleSidebarVisibilityAction.ID,
title: localize('toggleSideBar', "Toggle Primary Side Bar"),
- icon: panelLeftIcon,
- toggled: SideBarVisibleContext
+ icon: panelLeftOffIcon,
+ toggled: { condition: SideBarVisibleContext, icon: panelLeftIcon }
},
when: ContextKeyExpr.and(ContextKeyExpr.or(ContextKeyExpr.equals('config.workbench.layoutControl.type', 'toggles'), ContextKeyExpr.equals('config.workbench.layoutControl.type', 'both')), ContextKeyExpr.equals('config.workbench.sideBar.location', 'left')),
order: 0
@@ -440,8 +442,8 @@ MenuRegistry.appendMenuItems([
command: {
id: ToggleSidebarVisibilityAction.ID,
title: localize('toggleSideBar', "Toggle Primary Side Bar"),
- icon: panelRightIcon,
- toggled: SideBarVisibleContext
+ icon: panelRightOffIcon,
+ toggled: { condition: SideBarVisibleContext, icon: panelRightIcon }
},
when: ContextKeyExpr.and(ContextKeyExpr.or(ContextKeyExpr.equals('config.workbench.layoutControl.type', 'toggles'), ContextKeyExpr.equals('config.workbench.layoutControl.type', 'both')), ContextKeyExpr.equals('config.workbench.sideBar.location', 'right')),
order: 2
diff --git a/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.ts b/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.ts
index d51d77237fb..65fa0d523c4 100644
--- a/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.ts
+++ b/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.ts
@@ -17,8 +17,10 @@ import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/bro
import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite';
-const auxiliaryBarRightIcon = registerIcon('auxiliarybar-right-layout-icon', Codicon.layoutSidebarRight, localize('toggleAuxiliaryIconRight', 'Icon to toggle the auxiliary bar in its right position.'));
+const auxiliaryBarRightIcon = registerIcon('auxiliarybar-right-layout-icon', Codicon.layoutSidebarRight, localize('toggleAuxiliaryIconRight', 'Icon to toggle the auxiliary bar off in its right position.'));
+const auxiliaryBarRightOffIcon = registerIcon('auxiliarybar-right-off-layout-icon', Codicon.layoutSidebarRightOff, localize('toggleAuxiliaryIconRightOn', 'Icon to toggle the auxiliary bar on in its right position.'));
const auxiliaryBarLeftIcon = registerIcon('auxiliarybar-left-layout-icon', Codicon.layoutSidebarLeft, localize('toggleAuxiliaryIconLeft', 'Icon to toggle the auxiliary bar in its left position.'));
+const auxiliaryBarLeftOffIcon = registerIcon('auxiliarybar-left-off-layout-icon', Codicon.layoutSidebarLeftOff, localize('toggleAuxiliaryIconLeftOn', 'Icon to toggle the auxiliary bar on in its left position.'));
export class ToggleAuxiliaryBarAction extends Action {
@@ -87,8 +89,8 @@ MenuRegistry.appendMenuItems([
command: {
id: ToggleAuxiliaryBarAction.ID,
title: localize('toggleSecondarySideBar', "Toggle Secondary Side Bar"),
- toggled: AuxiliaryBarVisibleContext,
- icon: auxiliaryBarLeftIcon,
+ toggled: { condition: AuxiliaryBarVisibleContext, icon: auxiliaryBarLeftIcon },
+ icon: auxiliaryBarLeftOffIcon,
},
when: ContextKeyExpr.and(ContextKeyExpr.or(ContextKeyExpr.equals('config.workbench.layoutControl.type', 'toggles'), ContextKeyExpr.equals('config.workbench.layoutControl.type', 'both')), ContextKeyExpr.equals('config.workbench.sideBar.location', 'right')),
order: 0
@@ -101,8 +103,8 @@ MenuRegistry.appendMenuItems([
command: {
id: ToggleAuxiliaryBarAction.ID,
title: localize('toggleSecondarySideBar', "Toggle Secondary Side Bar"),
- toggled: AuxiliaryBarVisibleContext,
- icon: auxiliaryBarRightIcon,
+ toggled: { condition: AuxiliaryBarVisibleContext, icon: auxiliaryBarRightIcon },
+ icon: auxiliaryBarRightOffIcon,
},
when: ContextKeyExpr.and(ContextKeyExpr.or(ContextKeyExpr.equals('config.workbench.layoutControl.type', 'toggles'), ContextKeyExpr.equals('config.workbench.layoutControl.type', 'both')), ContextKeyExpr.equals('config.workbench.sideBar.location', 'left')),
order: 2
diff --git a/src/vs/workbench/browser/parts/panel/panelActions.ts b/src/vs/workbench/browser/parts/panel/panelActions.ts
index 2ed2341a1b8..8663a928675 100644
--- a/src/vs/workbench/browser/parts/panel/panelActions.ts
+++ b/src/vs/workbench/browser/parts/panel/panelActions.ts
@@ -26,7 +26,8 @@ import { ICommandActionTitle } from 'vs/platform/action/common/action';
const maximizeIcon = registerIcon('panel-maximize', Codicon.chevronUp, localize('maximizeIcon', 'Icon to maximize a panel.'));
const restoreIcon = registerIcon('panel-restore', Codicon.chevronDown, localize('restoreIcon', 'Icon to restore a panel.'));
const closeIcon = registerIcon('panel-close', Codicon.close, localize('closeIcon', 'Icon to close a panel.'));
-const panelIcon = registerIcon('panel-layout-icon', Codicon.layoutPanel, localize('togglePanelIcon', 'Icon to toggle the panel.'));
+const panelIcon = registerIcon('panel-layout-icon', Codicon.layoutPanel, localize('togglePanelOffIcon', 'Icon to toggle the panel off when it is on.'));
+const panelOffIcon = registerIcon('panel-layout-icon-off', Codicon.layoutPanelOff, localize('togglePanelOnIcon', 'Icon to toggle the panel on when it is off.'));
export class TogglePanelAction extends Action {
@@ -444,8 +445,8 @@ MenuRegistry.appendMenuItems([
command: {
id: TogglePanelAction.ID,
title: localize('togglePanel', "Toggle Panel"),
- icon: panelIcon,
- toggled: PanelVisibleContext
+ icon: panelOffIcon,
+ toggled: { condition: PanelVisibleContext, icon: panelIcon }
},
when: ContextKeyExpr.or(ContextKeyExpr.equals('config.workbench.layoutControl.type', 'toggles'), ContextKeyExpr.equals('config.workbench.layoutControl.type', 'both')),
order: 1