summaryrefslogtreecommitdiff
path: root/scene/gui/gradient_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/gradient_edit.cpp')
-rw-r--r--scene/gui/gradient_edit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp
index 6345bfe562..88107f754c 100644
--- a/scene/gui/gradient_edit.cpp
+++ b/scene/gui/gradient_edit.cpp
@@ -76,15 +76,15 @@ void GradientEdit::_show_color_picker() {
if (grabbed == -1)
return;
picker->set_pick_color(points[grabbed].color);
- Size2 minsize = popup->get_combined_minimum_size();
+ Size2 minsize = popup->get_contents_minimum_size();
bool show_above = false;
if (get_global_position().y + get_size().y + minsize.y > get_viewport_rect().size.y) {
show_above = true;
}
if (show_above) {
- popup->set_position(get_global_position() - Vector2(0, minsize.y));
+ popup->set_position(get_screen_position() - Vector2(0, minsize.y));
} else {
- popup->set_position(get_global_position() + Vector2(0, get_size().y));
+ popup->set_position(get_screen_position() + Vector2(0, get_size().y));
}
popup->popup();
}