Merge pull request #37578 from Anutrix/file_dialog_icon_fix
Fix file dialog not showing icons
This commit is contained in:
commit
1957c99ab4
|
@ -73,9 +73,9 @@ void FileDialog::_notification(int p_what) {
|
||||||
}
|
}
|
||||||
if (p_what == NOTIFICATION_ENTER_TREE) {
|
if (p_what == NOTIFICATION_ENTER_TREE) {
|
||||||
|
|
||||||
dir_up->set_icon(vbox->get_theme_icon("parent_folder"));
|
dir_up->set_icon(vbox->get_theme_icon("parent_folder", "FileDialog"));
|
||||||
refresh->set_icon(vbox->get_theme_icon("reload"));
|
refresh->set_icon(vbox->get_theme_icon("reload", "FileDialog"));
|
||||||
show_hidden->set_icon(vbox->get_theme_icon("toggle_hidden"));
|
show_hidden->set_icon(vbox->get_theme_icon("toggle_hidden", "FileDialog"));
|
||||||
_theme_changed();
|
_theme_changed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -429,8 +429,8 @@ void FileDialog::update_file_list() {
|
||||||
dir_access->list_dir_begin();
|
dir_access->list_dir_begin();
|
||||||
|
|
||||||
TreeItem *root = tree->create_item();
|
TreeItem *root = tree->create_item();
|
||||||
Ref<Texture2D> folder = vbox->get_theme_icon("folder");
|
Ref<Texture2D> folder = vbox->get_theme_icon("folder", "FileDialog");
|
||||||
const Color folder_color = vbox->get_theme_color("folder_icon_modulate");
|
const Color folder_color = vbox->get_theme_color("folder_icon_modulate", "FileDialog");
|
||||||
List<String> files;
|
List<String> files;
|
||||||
List<String> dirs;
|
List<String> dirs;
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ void FileDialog::update_file_list() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == FILE_MODE_OPEN_DIR) {
|
if (mode == FILE_MODE_OPEN_DIR) {
|
||||||
ti->set_custom_color(0, vbox->get_theme_color("files_disabled"));
|
ti->set_custom_color(0, vbox->get_theme_color("files_disabled", "FileDialog"));
|
||||||
ti->set_selectable(0, false);
|
ti->set_selectable(0, false);
|
||||||
}
|
}
|
||||||
Dictionary d;
|
Dictionary d;
|
||||||
|
|
Loading…
Reference in New Issue