diff --git a/src/widget.cpp b/src/widget.cpp index 1c590e3d3f..796291cde5 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -1134,6 +1134,18 @@ void NWidgetResizeBase::SetResize(uint resize_x, uint resize_y) this->resize_y = resize_y; } +/** + * Set absolute (post-scaling) minimal size of the widget. + * @param min_y Vertical minimal size of the widget. + * @return true iff the widget minimum size has changed. + */ +bool NWidgetResizeBase::UpdateVerticalSize(uint min_y) +{ + if (min_y == this->min_y) return false; + this->min_y = min_y; + return true; +} + void NWidgetResizeBase::AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl) { this->StoreSizePosition(sizing, x, y, given_width, given_height); diff --git a/src/widget_type.h b/src/widget_type.h index 078aa49b10..0133bc5174 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -263,6 +263,8 @@ public: void SetFill(uint fill_x, uint fill_y); void SetResize(uint resize_x, uint resize_y); + bool UpdateVerticalSize(uint min_y); + void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl) override; uint min_x; ///< Minimal horizontal size of only this widget.