Change to using a DragValue to set the exposures when adding a roll

This commit is contained in:
pjht 2023-05-30 15:48:50 -05:00
parent ddc9cc8ac8
commit 7b00d12265
Signed by: pjht
GPG Key ID: CA239FC6934E6F3A

View File

@ -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() {