summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/FileDialog.xml2
-rw-r--r--editor/editor_file_dialog.cpp6
-rw-r--r--editor/editor_themes.cpp2
-rw-r--r--editor/filesystem_dock.cpp6
-rw-r--r--scene/gui/file_dialog.cpp2
-rw-r--r--scene/resources/default_theme/default_theme.cpp2
6 files changed, 11 insertions, 9 deletions
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index e78f21b274..4f1e8cc309 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -134,6 +134,8 @@
</theme_item>
<theme_item name="folder" type="Texture">
</theme_item>
+ <theme_item name="folder_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </theme_item>
<theme_item name="parent_folder" type="Texture">
</theme_item>
<theme_item name="reload" type="Texture">
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 8c9aedc7b7..80aeeef868 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -257,7 +257,7 @@ void EditorFileDialog::_post_popup() {
if (is_visible_in_tree()) {
Ref<Texture> folder = get_icon("folder", "FileDialog");
- const Color folder_color = get_color("folder", "FileDialog");
+ const Color folder_color = get_color("folder_icon_modulate", "FileDialog");
recent->clear();
bool res = access == ACCESS_RESOURCES;
@@ -736,7 +736,7 @@ void EditorFileDialog::update_file_list() {
dir_access->list_dir_begin();
Ref<Texture> folder = get_icon("folder", "FileDialog");
- const Color folder_color = get_color("folder", "FileDialog");
+ const Color folder_color = get_color("folder_icon_modulate", "FileDialog");
List<String> files;
List<String> dirs;
@@ -1204,7 +1204,7 @@ void EditorFileDialog::_update_favorites() {
String current = get_current_dir();
Ref<Texture> folder_icon = get_icon("Folder", "EditorIcons");
- const Color folder_color = get_color("folder", "FileDialog");
+ const Color folder_color = get_color("folder_icon_modulate", "FileDialog");
favorites->clear();
favorite->set_pressed(false);
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index d962001b38..56eed96e31 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -1068,7 +1068,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("folder", "FileDialog", theme->get_icon("Folder", "EditorIcons"));
// Use a different color for folder icons to make them easier to distinguish from files.
// On a light theme, the icon will be dark, so we need to lighten it before blending it with the accent color.
- theme->set_color("folder", "FileDialog", (dark_theme ? Color(1, 1, 1) : Color(5, 5, 5)).linear_interpolate(accent_color, 0.7));
+ theme->set_color("folder_icon_modulate", "FileDialog", (dark_theme ? Color(1, 1, 1) : Color(5, 5, 5)).linear_interpolate(accent_color, 0.7));
theme->set_color("files_disabled", "FileDialog", font_color_disabled);
// color picker
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 83904800e9..b7a74f0035 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -64,7 +64,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
subdirectory_item->set_text(0, dname);
subdirectory_item->set_icon(0, get_icon("Folder", "EditorIcons"));
- subdirectory_item->set_icon_color(0, get_color("folder", "FileDialog"));
+ subdirectory_item->set_icon_color(0, get_color("folder_icon_modulate", "FileDialog"));
subdirectory_item->set_selectable(0, true);
String lpath = p_dir->get_path();
subdirectory_item->set_metadata(0, lpath);
@@ -187,7 +187,7 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo
continue;
Ref<Texture> folder_icon = get_icon("Folder", "EditorIcons");
- const Color folder_color = get_color("folder", "FileDialog");
+ const Color folder_color = get_color("folder_icon_modulate", "FileDialog");
String text;
Ref<Texture> icon;
@@ -646,7 +646,7 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
}
Ref<Texture> folder_icon = (use_thumbnails) ? folder_thumbnail : get_icon("folder", "FileDialog");
- const Color folder_color = get_color("folder", "FileDialog");
+ const Color folder_color = get_color("folder_icon_modulate", "FileDialog");
// Build the FileInfo list
List<FileInfo> filelist;
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 7305d7459c..0c096f0d97 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -400,7 +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");
+ const Color folder_color = get_color("folder_icon_modulate");
List<String> files;
List<String> dirs;
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 90787780d3..2664abdd2a 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -760,7 +760,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// FileDialog
theme->set_icon("folder", "FileDialog", make_icon(icon_folder_png));
- theme->set_color("folder", "FileDialog", Color(1, 1, 1));
+ theme->set_color("folder_icon_modulate", "FileDialog", Color(1, 1, 1));
theme->set_color("files_disabled", "FileDialog", Color(0, 0, 0, 0.7));
// colorPicker