diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index 47a1801f58a2..7c8910d06057 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -210,6 +210,9 @@
Custom icon for the back arrow.
+
+ Custom icon for the create folder button.
+
Custom icon for files.
diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp
index c7e991c353cd..d0b78a35cf8d 100644
--- a/editor/gui/editor_file_dialog.cpp
+++ b/editor/gui/editor_file_dialog.cpp
@@ -86,6 +86,7 @@ void EditorFileDialog::_update_theme_item_cache() {
theme_cache.mode_list = get_editor_theme_icon(SNAME("FileList"));
theme_cache.favorites_up = get_editor_theme_icon(SNAME("MoveUp"));
theme_cache.favorites_down = get_editor_theme_icon(SNAME("MoveDown"));
+ theme_cache.create_folder = get_editor_theme_icon(SNAME("FolderCreate"));
theme_cache.folder = get_editor_theme_icon(SNAME("Folder"));
theme_cache.folder_icon_color = get_theme_color(SNAME("folder_icon_color"), SNAME("FileDialog"));
@@ -1328,6 +1329,7 @@ void EditorFileDialog::_update_icons() {
refresh->set_icon(theme_cache.reload);
favorite->set_icon(theme_cache.favorite);
show_hidden->set_icon(theme_cache.toggle_hidden);
+ makedir->set_icon(theme_cache.create_folder);
fav_up->set_icon(theme_cache.favorites_up);
fav_down->set_icon(theme_cache.favorites_down);
@@ -1875,8 +1877,11 @@ EditorFileDialog::EditorFileDialog() {
drives->connect("item_selected", callable_mp(this, &EditorFileDialog::_select_drive));
pathhb->add_child(drives);
+ pathhb->add_child(memnew(VSeparator));
+
makedir = memnew(Button);
- makedir->set_text(TTR("Create Folder"));
+ makedir->set_theme_type_variation("FlatButton");
+ makedir->set_tooltip_text(TTR("Create a new folder."));
makedir->connect("pressed", callable_mp(this, &EditorFileDialog::_make_dir));
pathhb->add_child(makedir);
diff --git a/editor/gui/editor_file_dialog.h b/editor/gui/editor_file_dialog.h
index a9073e6f4ada..1e1c99bc7609 100644
--- a/editor/gui/editor_file_dialog.h
+++ b/editor/gui/editor_file_dialog.h
@@ -155,6 +155,7 @@ class EditorFileDialog : public ConfirmationDialog {
Ref favorite;
Ref mode_thumbnails;
Ref mode_list;
+ Ref create_folder;
Ref favorites_up;
Ref favorites_down;
diff --git a/editor/icons/FolderCreate.svg b/editor/icons/FolderCreate.svg
new file mode 100644
index 000000000000..80a3f90e2aa0
--- /dev/null
+++ b/editor/icons/FolderCreate.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/editor/themes/editor_theme_manager.cpp b/editor/themes/editor_theme_manager.cpp
index 23534568c692..f55ac6f59a9c 100644
--- a/editor/themes/editor_theme_manager.cpp
+++ b/editor/themes/editor_theme_manager.cpp
@@ -1279,6 +1279,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref &p_the
p_theme->set_icon("forward_folder", "FileDialog", p_theme->get_icon(SNAME("Forward"), EditorStringName(EditorIcons)));
p_theme->set_icon("reload", "FileDialog", p_theme->get_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
p_theme->set_icon("toggle_hidden", "FileDialog", p_theme->get_icon(SNAME("GuiVisibilityVisible"), EditorStringName(EditorIcons)));
+ p_theme->set_icon("create_folder", "FileDialog", p_theme->get_icon(SNAME("FolderCreate"), EditorStringName(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.
p_theme->set_color("folder_icon_color", "FileDialog", (p_config.dark_theme ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25)).lerp(p_config.accent_color, 0.7));
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 8f58c1e6f527..178af01a3e90 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -187,6 +187,7 @@ void FileDialog::_notification(int p_what) {
}
refresh->set_icon(theme_cache.reload);
show_hidden->set_icon(theme_cache.toggle_hidden);
+ makedir->set_icon(theme_cache.create_folder);
dir_up->begin_bulk_theme_override();
dir_up->add_theme_color_override("icon_normal_color", theme_cache.icon_normal_color);
@@ -223,6 +224,13 @@ void FileDialog::_notification(int p_what) {
show_hidden->add_theme_color_override("icon_pressed_color", theme_cache.icon_pressed_color);
show_hidden->end_bulk_theme_override();
+ makedir->begin_bulk_theme_override();
+ makedir->add_theme_color_override("icon_normal_color", theme_cache.icon_normal_color);
+ makedir->add_theme_color_override("icon_hover_color", theme_cache.icon_hover_color);
+ makedir->add_theme_color_override("icon_focus_color", theme_cache.icon_focus_color);
+ makedir->add_theme_color_override("icon_pressed_color", theme_cache.icon_pressed_color);
+ makedir->end_bulk_theme_override();
+
invalidate();
} break;
@@ -1331,6 +1339,7 @@ void FileDialog::_bind_methods() {
BIND_THEME_ITEM(Theme::DATA_TYPE_ICON, FileDialog, toggle_hidden);
BIND_THEME_ITEM(Theme::DATA_TYPE_ICON, FileDialog, folder);
BIND_THEME_ITEM(Theme::DATA_TYPE_ICON, FileDialog, file);
+ BIND_THEME_ITEM(Theme::DATA_TYPE_ICON, FileDialog, create_folder);
BIND_THEME_ITEM(Theme::DATA_TYPE_COLOR, FileDialog, folder_icon_color);
BIND_THEME_ITEM(Theme::DATA_TYPE_COLOR, FileDialog, file_icon_color);
@@ -1426,7 +1435,8 @@ FileDialog::FileDialog() {
hbc->add_child(shortcuts_container);
makedir = memnew(Button);
- makedir->set_text(RTR("Create Folder"));
+ makedir->set_theme_type_variation("FlatButton");
+ makedir->set_tooltip_text(RTR("Create a new folder."));
makedir->connect("pressed", callable_mp(this, &FileDialog::_make_dir));
hbc->add_child(makedir);
vbox->add_child(hbc);
diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h
index 7356e1c9e3cd..1b53c7e05e32 100644
--- a/scene/gui/file_dialog.h
+++ b/scene/gui/file_dialog.h
@@ -120,6 +120,7 @@ class FileDialog : public ConfirmationDialog {
Ref toggle_hidden;
Ref folder;
Ref file;
+ Ref create_folder;
Color folder_icon_color;
Color file_icon_color;
diff --git a/scene/theme/default_theme.cpp b/scene/theme/default_theme.cpp
index fa83e06315ab..634b32c9f61a 100644
--- a/scene/theme/default_theme.cpp
+++ b/scene/theme/default_theme.cpp
@@ -651,6 +651,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const
theme->set_icon("toggle_hidden", "FileDialog", icons["visibility_visible"]);
theme->set_icon("folder", "FileDialog", icons["folder"]);
theme->set_icon("file", "FileDialog", icons["file"]);
+ theme->set_icon("create_folder", "FileDialog", icons["folder_create"]);
theme->set_color("folder_icon_color", "FileDialog", Color(1, 1, 1));
theme->set_color("file_icon_color", "FileDialog", Color(1, 1, 1));
theme->set_color("file_disabled_color", "FileDialog", Color(1, 1, 1, 0.25));
diff --git a/scene/theme/icons/folder_create.svg b/scene/theme/icons/folder_create.svg
new file mode 100644
index 000000000000..d11d0715a12f
--- /dev/null
+++ b/scene/theme/icons/folder_create.svg
@@ -0,0 +1 @@
+
\ No newline at end of file