Skip to content

Commit fcaf253

Browse files
committed
Merge pull request godotengine#77625 from anvilfolk/itgrowwws
Increase vertical size of `CurveEdit` when `Inspector` widens
2 parents 750b9b0 + befe93b commit fcaf253

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

editor/plugins/curve_editor_plugin.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void CurveEdit::set_snap_count(int p_snap_count) {
105105
}
106106

107107
Size2 CurveEdit::get_minimum_size() const {
108-
return Vector2(64, 135) * EDSCALE;
108+
return Vector2(64, MAX(135, get_size().x * ASPECT_RATIO)) * EDSCALE;
109109
}
110110

111111
void CurveEdit::_notification(int p_what) {
@@ -986,6 +986,9 @@ void CurveEditor::_notification(int p_what) {
986986
snap_count_edit->set_value(curve->get_meta("_snap_count", DEFAULT_SNAP));
987987
}
988988
} break;
989+
case NOTIFICATION_RESIZED:
990+
curve_editor_rect->update_minimum_size();
991+
break;
989992
}
990993
}
991994

editor/plugins/curve_editor_plugin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ class CurveEdit : public Control {
104104
void _redraw();
105105

106106
private:
107+
const float ASPECT_RATIO = 6.f / 13.f;
108+
107109
Transform2D _world_to_view;
108110

109111
Ref<Curve> curve;

0 commit comments

Comments
 (0)