Fix project manager not picking custom font
This commit is contained in:
parent
428984ec0c
commit
c2ce39c424
@ -825,6 +825,19 @@ ProjectManager::ProjectManager() {
|
|||||||
FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"));
|
FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"));
|
||||||
|
|
||||||
set_area_as_parent_rect();
|
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 );
|
Panel *panel = memnew( Panel );
|
||||||
add_child(panel);
|
add_child(panel);
|
||||||
panel->set_area_as_parent_rect();
|
panel->set_area_as_parent_rect();
|
||||||
@ -972,10 +985,6 @@ ProjectManager::ProjectManager() {
|
|||||||
npdialog = memnew( NewProjectDialog );
|
npdialog = memnew( NewProjectDialog );
|
||||||
add_child(npdialog);
|
add_child(npdialog);
|
||||||
|
|
||||||
Ref<Theme> theme = memnew( Theme );
|
|
||||||
editor_register_icons(theme);
|
|
||||||
set_theme(theme);
|
|
||||||
|
|
||||||
npdialog->connect("project_created", this,"_load_recent_projects");
|
npdialog->connect("project_created", this,"_load_recent_projects");
|
||||||
_load_recent_projects();
|
_load_recent_projects();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user