mirror of
https://github.com/godotengine/godot.git
synced 2024-12-04 01:52:56 +00:00
Fix Offset with OptionButton Popup
Fixes the offset issue with the OptionButton's popup.
This commit is contained in:
parent
3418f76a9e
commit
b97e198bdd
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user