diff options
Diffstat (limited to 'tools/editor/project_manager.cpp')
-rw-r--r-- | tools/editor/project_manager.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index af57d5264e..84d6a87688 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -45,8 +45,9 @@ #include "io/resource_saver.h" #include "editor_icons.h" +#include "editor_fonts.h" - +#include "editor_scale.h" class NewProjectDialog : public ConfirmationDialog { @@ -829,6 +830,17 @@ ProjectManager::ProjectManager() { if (!EditorSettings::get_singleton()) EditorSettings::create(); + { + int dpi_mode = EditorSettings::get_singleton()->get("global/hidpi_mode"); + if (dpi_mode==0) { + editor_set_hidpi( OS::get_singleton()->get_screen_dpi(0) > 150 ); + } else if (dpi_mode==2) { + editor_set_hidpi(true); + } else { + editor_set_hidpi(false); + } + } + FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files")); set_area_as_parent_rect(); @@ -836,6 +848,7 @@ ProjectManager::ProjectManager() { Ref<Theme> theme = Ref<Theme>( memnew( Theme ) ); set_theme(theme); editor_register_icons(theme); + editor_register_fonts(theme); String global_font = EditorSettings::get_singleton()->get("global/font"); if (global_font!="") { |