Skip to content

Commit 12d7487

Browse files
committed
Fix folder color in FileSystem Dock when using light theme
1 parent 0c51ede commit 12d7487

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
@@ -1080,7 +1080,11 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
10801080

10811081
files->set_item_metadata(-1, bd);
10821082
files->set_item_selectable(-1, false);
1083-
files->set_item_icon_modulate(-1, editor_is_dark_theme ? inherited_folder_color : inherited_folder_color * ITEM_COLOR_SCALE);
1083+
if (!editor_is_dark_theme && inherited_folder_color != default_folder_color) {
1084+
files->set_item_icon_modulate(-1, inherited_folder_color * ITEM_COLOR_SCALE);
1085+
} else {
1086+
files->set_item_icon_modulate(-1, inherited_folder_color);
1087+
}
10841088
}
10851089

10861090
bool reversed = file_sort == FileSortOption::FILE_SORT_NAME_REVERSE;
@@ -1094,7 +1098,10 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
10941098
files->add_item(dname, folder_icon, true);
10951099
files->set_item_metadata(-1, dpath);
10961100
Color this_folder_color = has_custom_color ? folder_colors[assigned_folder_colors[dpath]] : inherited_folder_color;
1097-
files->set_item_icon_modulate(-1, editor_is_dark_theme ? this_folder_color : this_folder_color * ITEM_COLOR_SCALE);
1101+
if (!editor_is_dark_theme && this_folder_color != default_folder_color) {
1102+
this_folder_color *= ITEM_COLOR_SCALE;
1103+
}
1104+
files->set_item_icon_modulate(-1, this_folder_color);
10981105

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

0 commit comments

Comments
 (0)