Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap list/tree icons to reflect current state instead of target state #164835

Merged
merged 2 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/scm/browser/scmViewPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ class SetListViewModeAction extends ViewAction<SCMViewPane> {
title: localize('setListViewMode', "View as List"),
viewId: VIEW_PANE_ID,
f1: false,
icon: Codicon.listFlat,
icon: Codicon.listTree,
toggled: ContextKeys.ViewModelMode.isEqualTo(ViewModelMode.List),
menu: { id: Menus.ViewSort, group: '1_viewmode', ...menu }
});
Expand Down Expand Up @@ -1543,7 +1543,7 @@ class SetTreeViewModeAction extends ViewAction<SCMViewPane> {
title: localize('setTreeViewMode', "View as Tree"),
viewId: VIEW_PANE_ID,
f1: false,
icon: Codicon.listTree,
icon: Codicon.listFlat,
toggled: ContextKeys.ViewModelMode.isEqualTo(ViewModelMode.Tree),
menu: { id: Menus.ViewSort, group: '1_viewmode', ...menu }
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ registerAction2(class ViewAsTreeAction extends Action2 {
original: 'View as Tree'
},
category,
icon: searchShowAsTree,
icon: searchShowAsList,
f1: true,
precondition: ContextKeyExpr.and(Constants.HasSearchResults, Constants.InTreeViewKey.toNegated()),
menu: [{
Expand Down Expand Up @@ -575,7 +575,7 @@ registerAction2(class ViewAsListAction extends Action2 {
original: 'View as List'
},
category,
icon: searchShowAsList,
icon: searchShowAsTree,
f1: true,
precondition: ContextKeyExpr.and(Constants.HasSearchResults, Constants.InTreeViewKey),
menu: [{
Expand Down