Adjust auto scale on high res displays
(cherry picked from commit 466cf0b466
)
This commit is contained in:
parent
fc0419d84a
commit
729a9c8a5e
3 changed files with 12 additions and 0 deletions
|
@ -5858,6 +5858,10 @@ EditorNode::EditorNode() {
|
||||||
if (OS::get_singleton()->get_screen_dpi(screen) >= 192 && OS::get_singleton()->get_screen_size(screen).y >= 1400) {
|
if (OS::get_singleton()->get_screen_dpi(screen) >= 192 && OS::get_singleton()->get_screen_size(screen).y >= 1400) {
|
||||||
// hiDPI display.
|
// hiDPI display.
|
||||||
scale = 2.0;
|
scale = 2.0;
|
||||||
|
} else if (OS::get_singleton()->get_screen_size(screen).y >= 1700) {
|
||||||
|
// Likely a hiDPI display, but we aren't certain due to the returned DPI.
|
||||||
|
// Use an intermediate scale to handle this situation.
|
||||||
|
scale = 1.5;
|
||||||
} else if (OS::get_singleton()->get_screen_size(screen).y <= 800) {
|
} else if (OS::get_singleton()->get_screen_size(screen).y <= 800) {
|
||||||
// Small loDPI display. Use a smaller display scale so that editor elements fit more easily.
|
// Small loDPI display. Use a smaller display scale so that editor elements fit more easily.
|
||||||
// Icons won't look great, but this is better than having editor elements overflow from its window.
|
// Icons won't look great, but this is better than having editor elements overflow from its window.
|
||||||
|
|
|
@ -328,6 +328,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||||
if (OS::get_singleton()->get_screen_dpi(screen) >= 192 && OS::get_singleton()->get_screen_size(screen).y >= 1400) {
|
if (OS::get_singleton()->get_screen_dpi(screen) >= 192 && OS::get_singleton()->get_screen_size(screen).y >= 1400) {
|
||||||
// hiDPI display.
|
// hiDPI display.
|
||||||
scale = 2.0;
|
scale = 2.0;
|
||||||
|
} else if (OS::get_singleton()->get_screen_size(screen).y >= 1700) {
|
||||||
|
// Likely a hiDPI display, but we aren't certain due to the returned DPI.
|
||||||
|
// Use an intermediate scale to handle this situation.
|
||||||
|
scale = 1.5;
|
||||||
} else if (OS::get_singleton()->get_screen_size(screen).y <= 800) {
|
} else if (OS::get_singleton()->get_screen_size(screen).y <= 800) {
|
||||||
// Small loDPI display. Use a smaller display scale so that editor elements fit more easily.
|
// Small loDPI display. Use a smaller display scale so that editor elements fit more easily.
|
||||||
// Icons won't look great, but this is better than having editor elements overflow from its window.
|
// Icons won't look great, but this is better than having editor elements overflow from its window.
|
||||||
|
|
|
@ -2448,6 +2448,10 @@ ProjectManager::ProjectManager() {
|
||||||
if (OS::get_singleton()->get_screen_dpi(screen) >= 192 && OS::get_singleton()->get_screen_size(screen).y >= 1400) {
|
if (OS::get_singleton()->get_screen_dpi(screen) >= 192 && OS::get_singleton()->get_screen_size(screen).y >= 1400) {
|
||||||
// hiDPI display.
|
// hiDPI display.
|
||||||
scale = 2.0;
|
scale = 2.0;
|
||||||
|
} else if (OS::get_singleton()->get_screen_size(screen).y >= 1700) {
|
||||||
|
// Likely a hiDPI display, but we aren't certain due to the returned DPI.
|
||||||
|
// Use an intermediate scale to handle this situation.
|
||||||
|
scale = 1.5;
|
||||||
} else if (OS::get_singleton()->get_screen_size(screen).y <= 800) {
|
} else if (OS::get_singleton()->get_screen_size(screen).y <= 800) {
|
||||||
// Small loDPI display. Use a smaller display scale so that editor elements fit more easily.
|
// Small loDPI display. Use a smaller display scale so that editor elements fit more easily.
|
||||||
// Icons won't look great, but this is better than having editor elements overflow from its window.
|
// Icons won't look great, but this is better than having editor elements overflow from its window.
|
||||||
|
|
Loading…
Reference in a new issue