diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2015-12-09 16:45:45 +0100 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2015-12-09 16:45:45 +0100 |
commit | 2d84943a2bb377914beed7767d01275a1f529889 (patch) | |
tree | 675915dd9fad4e54970482ad34775d79c377ba86 /tools/editor | |
parent | 02d352bfbf94ec07d4add7ecb2c860289c57657a (diff) | |
parent | c2ce39c4249f4e11cc0955b469c27c67a650f51e (diff) |
Merge pull request #3027 from TheHX/pr-project-manager-font
Fix project manager not picking up custom font
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/project_manager.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index 04705017d2..4db56ea2f9 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -825,6 +825,19 @@ ProjectManager::ProjectManager() { FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files")); set_area_as_parent_rect(); + + Ref<Theme> theme = Ref<Theme>( memnew( Theme ) ); + set_theme(theme); + editor_register_icons(theme); + + String global_font = EditorSettings::get_singleton()->get("global/font"); + if (global_font!="") { + Ref<Font> fnt = ResourceLoader::load(global_font); + if (fnt.is_valid()) { + theme->set_default_theme_font(fnt); + } + } + Panel *panel = memnew( Panel ); add_child(panel); panel->set_area_as_parent_rect(); @@ -972,10 +985,6 @@ ProjectManager::ProjectManager() { npdialog = memnew( NewProjectDialog ); add_child(npdialog); - Ref<Theme> theme = memnew( Theme ); - editor_register_icons(theme); - set_theme(theme); - npdialog->connect("project_created", this,"_load_recent_projects"); _load_recent_projects(); |