You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Use a different color for folder icons in file dialogs
This makes them easier to distinguish from files for quick visual grepping. This can also be used in projects by setting the FileDialog "folder" color. The default value (`Color(1, 1, 1)`) has no visual impact, for compatibility with existing projects.
This commit is contained in:
@@ -400,6 +400,7 @@ void FileDialog::update_file_list() {
|
||||
|
||||
TreeItem *root = tree->create_item();
|
||||
Ref<Texture> folder = get_icon("folder");
|
||||
const Color folder_color = get_color("folder");
|
||||
List<String> files;
|
||||
List<String> dirs;
|
||||
|
||||
@@ -429,6 +430,7 @@ void FileDialog::update_file_list() {
|
||||
TreeItem *ti = tree->create_item(root);
|
||||
ti->set_text(0, dir_name);
|
||||
ti->set_icon(0, folder);
|
||||
ti->set_icon_color(0, folder_color);
|
||||
|
||||
Dictionary d;
|
||||
d["name"] = dir_name;
|
||||
|
||||
Reference in New Issue
Block a user