Skip to content

Commit 1df6a40

Browse files
committed
Merge pull request godotengine#110066 from Giganzo/folder-color
Fix folder color in FileSystem Dock when using light theme
2 parents f9be832 + 12d7487 commit 1df6a40

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

editor/docks/filesystem_dock.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,11 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
10731073

10741074
files->set_item_metadata(-1, bd);
10751075
files->set_item_selectable(-1, false);
1076-
files->set_item_icon_modulate(-1, editor_is_dark_theme ? inherited_folder_color : inherited_folder_color * ITEM_COLOR_SCALE);
1076+
if (!editor_is_dark_theme && inherited_folder_color != default_folder_color) {
1077+
files->set_item_icon_modulate(-1, inherited_folder_color * ITEM_COLOR_SCALE);
1078+
} else {
1079+
files->set_item_icon_modulate(-1, inherited_folder_color);
1080+
}
10771081
}
10781082

10791083
bool reversed = file_sort == FileSortOption::FILE_SORT_NAME_REVERSE;
@@ -1087,7 +1091,10 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
10871091
files->add_item(dname, folder_icon, true);
10881092
files->set_item_metadata(-1, dpath);
10891093
Color this_folder_color = has_custom_color ? folder_colors[assigned_folder_colors[dpath]] : inherited_folder_color;
1090-
files->set_item_icon_modulate(-1, editor_is_dark_theme ? this_folder_color : this_folder_color * ITEM_COLOR_SCALE);
1094+
if (!editor_is_dark_theme && this_folder_color != default_folder_color) {
1095+
this_folder_color *= ITEM_COLOR_SCALE;
1096+
}
1097+
files->set_item_icon_modulate(-1, this_folder_color);
10911098

10921099
if (previous_selection.has(dname)) {
10931100
files->select(files->get_item_count() - 1, false);

0 commit comments

Comments
 (0)