From ec3537a6ac638cb3b495bf27ab2a7fb64bf0d303 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 4 Sep 2024 11:35:43 -0400 Subject: [PATCH] Add zoom flooors (#1267) Closes #1264 --- libs/sst/sst-jucegui | 2 +- .../app/edit-screen/components/mapping-pane/MappingDisplay.cpp | 2 ++ .../app/edit-screen/components/mapping-pane/VariantDisplay.cpp | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/sst/sst-jucegui b/libs/sst/sst-jucegui index 62241c60..456caf35 160000 --- a/libs/sst/sst-jucegui +++ b/libs/sst/sst-jucegui @@ -1 +1 @@ -Subproject commit 62241c60920fd5af19b3321a9f71ea657993ccb3 +Subproject commit 456caf35b95073ad00a783ea6288a10801d2c217 diff --git a/src-ui/app/edit-screen/components/mapping-pane/MappingDisplay.cpp b/src-ui/app/edit-screen/components/mapping-pane/MappingDisplay.cpp index 0793aea7..a3c5e093 100644 --- a/src-ui/app/edit-screen/components/mapping-pane/MappingDisplay.cpp +++ b/src-ui/app/edit-screen/components/mapping-pane/MappingDisplay.cpp @@ -43,6 +43,8 @@ MappingDisplay::MappingDisplay(MacroMappingVariantPane *p) mappingZones = tmpLOK->mappingZones.get(); keyboard = tmpLOK->keyboard.get(); zoneLayoutViewport = std::make_unique(std::move(tmpLOK)); + zoneLayoutViewport->setHZoomFloor((36 + 2) * 1.f / 128.f); + zoneLayoutViewport->setVZoomFloor(32.f / 128.f); addAndMakeVisible(*zoneLayoutViewport); zoneHeader = std::make_unique(editor); diff --git a/src-ui/app/edit-screen/components/mapping-pane/VariantDisplay.cpp b/src-ui/app/edit-screen/components/mapping-pane/VariantDisplay.cpp index d3f266d4..ad25208a 100644 --- a/src-ui/app/edit-screen/components/mapping-pane/VariantDisplay.cpp +++ b/src-ui/app/edit-screen/components/mapping-pane/VariantDisplay.cpp @@ -44,6 +44,8 @@ VariantDisplay::VariantDisplay(scxt::ui::app::edit_screen::MacroMappingVariantPa { waveforms[i].waveformViewport = std::make_unique(std::make_unique(this)); + waveforms[i].waveformViewport->setVZoomFloor(1.0 / 16.0); + waveforms[i].waveform = static_cast( waveforms[i].waveformViewport->contents->associatedComponent()); }