Skip to content

Commit 292fe76

Browse files
committed
Fix Control::_update_minimum_size() not updating offsets
1 parent 250ef8d commit 292fe76

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scene/gui/control.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,6 +1659,12 @@ void Control::_update_minimum_size() {
16591659
data.updating_last_minimum_size = false;
16601660

16611661
if (minsize != data.last_minimum_size) {
1662+
Size2 old_minsize = data.last_minimum_size;
1663+
1664+
if ((data.size_cache.is_equal_approx(old_minsize)) && (minsize.width < old_minsize.width || minsize.height < old_minsize.height) && data.stored_layout_mode != LayoutMode::LAYOUT_MODE_ANCHORS) {
1665+
_compute_offsets(Rect2(data.pos_cache, minsize), data.anchor, data.offset);
1666+
}
1667+
16621668
data.last_minimum_size = minsize;
16631669
_size_changed();
16641670
emit_signal(SceneStringName(minimum_size_changed));

0 commit comments

Comments
 (0)