Set minimum size for the visualiser to prevent issues

pull/275/head
James H Ball 2025-01-08 21:39:40 +00:00
rodzic 51c334ea82
commit 817177e620
2 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -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));
}
}

Wyświetl plik

@ -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);
}
}