Skip to content

Commit 58888d5

Browse files
authored
fix: maximized icon displayed incorrect (#281)
1 parent f58f0a1 commit 58888d5

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/i18n/source/en.ts

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export default {
5151
'panel.output.title': 'output',
5252
'panel.toolbox.closePanel': 'Close Panel',
5353
'panel.toolbox.maximize': 'Maximize Panel Size',
54+
'panel.toolbox.restoreSize': 'Restore Panel Size',
5455
'panel.problems.title': 'Problems',
5556
'panel.problems.empty':
5657
'No problems have been detected in the workspace.',

src/i18n/source/zh-CN.json

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"panel.problems.empty": "未在工作区检测到问题",
5252
"panel.toolbox.closePanel": "关闭面板",
5353
"panel.toolbox.maximize": "最大化面板",
54+
"panel.toolbox.restoreSize": "恢复面板大小",
5455
"notification.title": "通知",
5556
"notification.title.no": "没有新通知",
5657
"editor.closeToRight": "关闭右边",

src/services/workbench/panelService.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ export class PanelService extends Component<IPanel> implements IPanelService {
6767
const resizeBtn = toolbox[resizeBtnIndex];
6868
if (resizeBtn) {
6969
if (panelMaximized) {
70+
toolbox[resizeBtnIndex] = builtInPanelToolboxResize();
71+
} else {
7072
toolbox[resizeBtnIndex] = Object.assign({}, resizeBtn, {
7173
title: localize(
7274
PANEL_TOOLBOX_RESTORE_SIZE,
7375
'Restore Panel Size'
7476
),
7577
iconName: 'codicon-chevron-down',
7678
});
77-
} else {
78-
toolbox[resizeBtnIndex] = builtInPanelToolboxResize();
7979
}
8080
this.layoutService.togglePanelMaximized();
8181
}

0 commit comments

Comments
 (0)