Change to using a DragValue to set the exposures when adding a roll
This commit is contained in:
parent
ddc9cc8ac8
commit
7b00d12265
@ -1,11 +1,11 @@
|
|||||||
use chrono::{Local, NaiveDate};
|
use chrono::{Local, NaiveDate};
|
||||||
use eframe::{
|
use eframe::{
|
||||||
egui::{self, Slider, Window},
|
egui::{self, Window, DragValue},
|
||||||
epaint::Color32,
|
epaint::Color32,
|
||||||
};
|
};
|
||||||
use egui_datepicker::DatePicker;
|
use egui_datepicker::DatePicker;
|
||||||
|
|
||||||
use crate::{AppState, roll::Roll};
|
use crate::{roll::Roll, AppState};
|
||||||
|
|
||||||
pub struct NewRollWindow {
|
pub struct NewRollWindow {
|
||||||
id: String,
|
id: String,
|
||||||
@ -59,7 +59,7 @@ impl NewRollWindow {
|
|||||||
});
|
});
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
let label = ui.label("Num exposures: ");
|
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);
|
.labelled_by(label.id);
|
||||||
});
|
});
|
||||||
if ui.button("Submit").clicked() {
|
if ui.button("Submit").clicked() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user