Merge pull request #31267 from sparkart/fix_optionbutton_offset

Fix Offset with OptionButton Popup
This commit is contained in:
Rémi Verschelde 2019-08-14 11:43:42 +02:00 committed by GitHub
commit 1dae4c9e7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;