diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-18 13:39:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 13:39:57 +0100 |
commit | 7c771ea3101b19600be3c485ddd15da8b2cfb560 (patch) | |
tree | 7ebea7a618ce2120e13a74e59001812c92760e52 /scene | |
parent | 0a67b4639699277648a23f5a47d4b023d951bd6d (diff) | |
parent | f107139979d55eaa2f3ddc41f2c7d7895801f2e5 (diff) |
Merge pull request #47522 from madmiraal/rename-test_width-test_height
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/camera_2d.cpp | 2 | ||||
-rw-r--r-- | scene/gui/control.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index f4c0665f36..e8dfaf9c2e 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -530,7 +530,7 @@ Point2 Camera2D::get_camera_screen_center() const { Size2 Camera2D::_get_camera_screen_size() const { // special case if the camera2D is in the root viewport if (Engine::get_singleton()->is_editor_hint() && get_viewport()->get_parent_viewport() == get_tree()->get_root()) { - return Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height")); + return Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height")); } return get_viewport_rect().size; } diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 69e6d74292..11d7946866 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1306,7 +1306,7 @@ Rect2 Control::get_parent_anchorable_rect() const { #ifdef TOOLS_ENABLED Node *edited_root = get_tree()->get_edited_scene_root(); if (edited_root && (this == edited_root || edited_root->is_ancestor_of(this))) { - parent_rect.size = Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height")); + parent_rect.size = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height")); } else { parent_rect = get_viewport()->get_visible_rect(); } |