Skip to content

Commit

Permalink
Swap list/tree icons to reflect current state instead of target state (
Browse files Browse the repository at this point in the history
…#164835)

* Swap search result tree/list view icons

* Swap SCM list/tree view icons
  • Loading branch information
daviddossett committed Oct 28, 2022
1 parent 220efdc commit 77381ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 77381ab

Please sign in to comment.