Skip to content

Commit

Permalink
plugin-ext: default the folderExpanded icon
Browse files Browse the repository at this point in the history
In file icon themes, VS Code will use the
"folder" icon also for expanded folders
in the case that the theme omits the
"folderExpanded" entry. Theia should
do the same for consistency.

Fixes eclipse-theia#12727

Signed-off-by: Christian W. Damus <cdamus.ext@eclipsesource.com>
  • Loading branch information
cdamus committed Jul 31, 2023
1 parent 6607185 commit 54b363a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,12 @@ export class PluginIconTheme extends PluginIconThemeDefinition implements IconTh
): void {
if (associations.folder) {
accept(associations.folder, this.folderIcon);
if (associations.folderExpanded === undefined) {
// Use the same icon for expanded state (issue #12727). Check for
// undefined folderExpanded property to allow for
// "folderExpanded": null in case a developer really wants that
accept(associations.folder, this.folderExpandedIcon);
}
this.hasFolderIcons = true;
}
if (associations.folderExpanded) {
Expand Down

0 comments on commit 54b363a

Please sign in to comment.