mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
HiDPI: Use global/hidpi_mode as property
This commit is contained in:
parent
63ab89d28c
commit
955ed0a95f
@ -5257,7 +5257,7 @@ EditorNode::EditorNode() {
|
||||
if (!EditorSettings::get_singleton())
|
||||
EditorSettings::create();
|
||||
{
|
||||
int dpi_mode = EditorSettings::get_singleton()->get("global/hdpi_mode");
|
||||
int dpi_mode = EditorSettings::get_singleton()->get("global/hidpi_mode");
|
||||
print_line("DPI MODE: "+itos(dpi_mode));
|
||||
if (dpi_mode==0) {
|
||||
editor_set_hidpi( OS::get_singleton()->get_screen_dpi(0) > 150 );
|
||||
|
@ -493,8 +493,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||
hints["global/editor_language"]=PropertyInfo(Variant::STRING,"global/editor_language",PROPERTY_HINT_ENUM,lang_hint,PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
|
||||
}
|
||||
|
||||
set("global/hdpi_mode",0);
|
||||
hints["global/hdpi_mode"]=PropertyInfo(Variant::INT,"global/hdpi_mode",PROPERTY_HINT_ENUM,"Auto,LoDPI,HiDPI",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
|
||||
set("global/hidpi_mode",0);
|
||||
hints["global/hidpi_mode"]=PropertyInfo(Variant::INT,"global/hidpi_mode",PROPERTY_HINT_ENUM,"Auto,LoDPI,HiDPI",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
|
||||
set("global/show_script_in_scene_tabs",false);
|
||||
set("global/font_size",14);
|
||||
hints["global/font_size"]=PropertyInfo(Variant::INT,"global/font_size",PROPERTY_HINT_RANGE,"10,40,1",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
|
||||
|
@ -831,7 +831,7 @@ ProjectManager::ProjectManager() {
|
||||
EditorSettings::create();
|
||||
|
||||
{
|
||||
int dpi_mode = EditorSettings::get_singleton()->get("global/hdpi_mode");
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user