Skip to content

Commit 07f4c06

Browse files
authored
Merge pull request #112176 from dugramen/stretch-inline-container
Stretch inline buttons & center text to full property header height
2 parents 5345910 + d795a3b commit 07f4c06

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

editor/inspector/editor_inspector.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ void EditorProperty::_notification(int p_what) {
436436
}
437437

438438
Size2 rs = right_container->get_combined_minimum_size();
439+
rs.y = MAX(rs.y, rect.size.y);
439440
if (is_layout_rtl()) {
440441
fit_child_in_rect(right_container, Rect2(0, 0, rs.width, rs.y));
441442
} else {
@@ -444,6 +445,7 @@ void EditorProperty::_notification(int p_what) {
444445

445446
Size2 ls = left_container->get_combined_minimum_size();
446447
real_t right_size = rect.size.x + rs.x;
448+
ls.y = MAX(ls.y, rect.size.y);
447449
if (is_layout_rtl()) {
448450
fit_child_in_rect(left_container, Rect2(right_size, 0, size.x - right_size, ls.y));
449451
} else {
@@ -463,9 +465,8 @@ void EditorProperty::_notification(int p_what) {
463465
size.height = bottom_editor->get_offset(SIDE_TOP) - _get_v_separation();
464466
} else if (label_reference) {
465467
size.height = label_reference->get_size().height;
466-
} else if (label_overlayed) {
467-
size.height = left_container->get_size().height;
468468
}
469+
size.height = MAX(size.height, left_container->get_size().height);
469470

470471
// Only draw the label if it's not empty.
471472
if (label.is_empty()) {

0 commit comments

Comments
 (0)