From 7b00d122652e458cafb6c9cfb1b16c05bdc1477b Mon Sep 17 00:00:00 2001 From: pjht Date: Tue, 30 May 2023 15:48:50 -0500 Subject: [PATCH] Change to using a DragValue to set the exposures when adding a roll --- src/new_roll.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/new_roll.rs b/src/new_roll.rs index df53624..a76f7ca 100644 --- a/src/new_roll.rs +++ b/src/new_roll.rs @@ -1,11 +1,11 @@ use chrono::{Local, NaiveDate}; use eframe::{ - egui::{self, Slider, Window}, + egui::{self, Window, DragValue}, epaint::Color32, }; use egui_datepicker::DatePicker; -use crate::{AppState, roll::Roll}; +use crate::{roll::Roll, AppState}; pub struct NewRollWindow { id: String, @@ -59,7 +59,7 @@ impl NewRollWindow { }); ui.horizontal(|ui| { let label = ui.label("Num exposures: "); - ui.add(Slider::new(&mut self.exps, 1..=50).step_by(1.0)) + ui.add(DragValue::new(&mut self.exps).clamp_range(1..=50)) .labelled_by(label.id); }); if ui.button("Submit").clicked() {