Skip to content

Commit

Permalink
Set minimum size for the visualiser to prevent issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshball committed Jan 8, 2025
1 parent 51c334e commit 817177e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/MainComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ void MainComponent::resized() {
auto shiftedBounds = bounds;
shiftedBounds.setX(topLeft.getX());
shiftedBounds.setY(topLeft.getY());
if (minDim < 35) {
minDim = 35;
}
pluginEditor.visualiser.setBounds(shiftedBounds.withSizeKeepingCentre(minDim - 25, minDim));
}
}
6 changes: 6 additions & 0 deletions Source/SosciPluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ void SosciPluginEditor::resized() {
visualiserSettings.setSize(settingsArea.getWidth(), 550);
visualiserSettingsWrapper.setBounds(settingsArea);

if (area.getWidth() < 10) {
area.setWidth(10);
}
if (area.getHeight() < 10) {
area.setHeight(10);
}
visualiser.setBounds(area);
}
}
Expand Down

0 comments on commit 817177e

Please sign in to comment.