minimum sizes for all model controls #353
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Previously, when the HARP window was resized horizontally, several controls would shrink below a usable width. This caused Inconsistent layout behavior across different models. The goal of this fix is to ensure a minimum size for all model control widgets so that labels, sliders, toggles, combo boxes, and text fields do not collapse or overlap when the window is resized.
Changes Introduced
SliderWithLabel.h
Added getMinimumWidth() helper to compute width based on text size.
Ensures labels never overlap the rotary slider, even when window width shrinks.
ComboBoxWithLabel.h
Added minimum width enforcement using label text width and padding.
TitledTextBox.h
Added minimum width calculation based on title text and baseline textbox width.
ControlAreaWidget.h
Replaced hardcoded constants with dynamic minimum widths
Testing Steps
Load various models (e.g., VampNet, MegaTTS3, Stable Audio 2.0). Resize the window horizontally.
Controls no longer shrink below readable/usable size
Layout feels consistent across models
All components maintain a stable minimal-width behavior
Closes #332