1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

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

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;