From b97e198bddd72beb5aeaba12e98fcf667a35228b Mon Sep 17 00:00:00 2001 From: Emmanuel Barroga Date: Sat, 10 Aug 2019 05:41:16 -0700 Subject: [PATCH] Fix Offset with OptionButton Popup Fixes the offset issue with the OptionButton's popup. --- scene/gui/popup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 3e003af3967..c55ada0ed87 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;