Browse Source

Round to nearest zoom percent

tags/v0.6.0
Andrew Belt 7 years ago
parent
commit
264c040c6a
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/app/Toolbar.cpp

+ 2
- 1
src/app/Toolbar.cpp View File

@@ -151,12 +151,13 @@ Toolbar::Toolbar() {
struct ZoomSlider : Slider {
void onAction(EventAction &e) override {
Slider::onAction(e);
gRackScene->zoomWidget->setZoom(value / 100.0);
gRackScene->zoomWidget->setZoom(roundf(value) / 100.0);
}
};
zoomSlider = new ZoomSlider();
zoomSlider->box.pos = Vec(xPos, margin);
zoomSlider->box.size.x = 150;
zoomSlider->precision = 0;
zoomSlider->label = "Zoom";
zoomSlider->unit = "%";
zoomSlider->setLimits(25.0, 200.0);


Loading…
Cancel
Save