Open
Conversation
Collaborator
cwitkowitz
reviewed
Feb 5, 2026
src/MainComponent.cpp
Outdated
|
|
||
| if (auto* window = findParentComponentOfClass<DocumentWindow>()) | ||
| { | ||
| window->setResizeLimits(900, 700, 20000, 20000); |
Collaborator
There was a problem hiding this comment.
I don't see any noticeable difference from this line.
cwitkowitz
reviewed
Feb 7, 2026
Collaborator
There was a problem hiding this comment.
Changes look good, but the control areas can still overlap (try with xribene/HARP-UI-TEST-v3). Maybe there is some way to extend the controls to separate rows when there would otherwise be overflow.
I also agree with making an inherited class for the ToggleComponent, but intrinsically it already has a label so the current code duplicates this (see below).
Finally, it seems the fixed minimum height can still lead to the labels on the sliders getting cut off.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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