1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

-Added VeryLowDPI and MidDPI modes to Godot editor.

-Improved HiDPI detection (requires resolution of > 2000 in X axis)
This commit is contained in:
Juan Linietsky
2016-09-13 11:05:47 -03:00
parent 08b096ccc2
commit 8bcb6a290c
10 changed files with 61 additions and 41 deletions

View File

@@ -1185,11 +1185,15 @@ ProjectManager::ProjectManager() {
{
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 );
editor_set_scale( OS::get_singleton()->get_screen_dpi(0) > 150 ? 2.0 : 1.0 );
} else if (dpi_mode==1) {
editor_set_scale(0.75);
} else if (dpi_mode==2) {
editor_set_hidpi(true);
} else {
editor_set_hidpi(false);
editor_set_scale(1.0);
} else if (dpi_mode==3) {
editor_set_scale(1.5);
} else if (dpi_mode==4) {
editor_set_scale(2.0);
}
}