diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-14 11:43:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-14 11:43:42 +0200 |
commit | 1dae4c9e7f547ce5da12ed0d741feb2b26e306bb (patch) | |
tree | 7960e8367e2118b6bff207c6ea39a8cf27706022 /scene | |
parent | 1387c683d48cbe144b24453459d02376180ba42c (diff) | |
parent | b97e198bddd72beb5aeaba12e98fcf667a35228b (diff) |
Merge pull request #31267 from sparkart/fix_optionbutton_offset
Fix Offset with OptionButton Popup
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/popup.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 9a3070b5c5..32380b6457 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -74,7 +74,7 @@ void Popup::_fix_size() { Point2 pos = get_global_position(); Size2 size = get_size() * get_scale(); - Point2 window_size = get_viewport_rect().size; + Point2 window_size = get_viewport_rect().size - get_viewport_transform().get_origin(); if (pos.x + size.width > window_size.width) pos.x = window_size.width - size.width; |