diff options
author | Emmanuel Barroga <emmanuelbarroga@gmail.com> | 2019-08-10 05:41:16 -0700 |
---|---|---|
committer | Emmanuel Barroga <emmanuelbarroga@gmail.com> | 2019-08-12 00:13:02 -0700 |
commit | b97e198bddd72beb5aeaba12e98fcf667a35228b (patch) | |
tree | 7a14bf4d77b3b4e41c213a3c68c68ed2d1450103 | |
parent | 3418f76a9eab9f496e5b26310bd3bc1125b8119b (diff) |
Fix Offset with OptionButton Popup
Fixes the offset issue with the OptionButton's popup.
-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 3e003af396..c55ada0ed8 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; |