Minor cleanup of the demo code
This commit is contained in:
parent
ab4819ca99
commit
3803d0f3d1
|
|
@ -65,23 +65,17 @@ impl PlotDemo {
|
|||
egui::DragValue::new(circle_radius)
|
||||
.speed(0.1)
|
||||
.clamp_range(0.0..=f32::INFINITY)
|
||||
// .logarithmic(true)
|
||||
// .smallest_positive(1e-2)
|
||||
.prefix("r: "),
|
||||
);
|
||||
ui.horizontal(|ui| {
|
||||
ui.add(
|
||||
egui::DragValue::new(&mut circle_center.x)
|
||||
.speed(0.1)
|
||||
// .logarithmic(true)
|
||||
// .smallest_positive(1e-2)
|
||||
.prefix("x: "),
|
||||
);
|
||||
ui.add(
|
||||
egui::DragValue::new(&mut circle_center.y)
|
||||
.speed(1.0)
|
||||
// .logarithmic(true)
|
||||
// .smallest_positive(1e-2)
|
||||
.prefix("y: "),
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -131,7 +131,8 @@ impl Widgets {
|
|||
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Password:");
|
||||
let response = ui.add(
|
||||
let response = ui.add_sized(
|
||||
[140.0, 20.0],
|
||||
egui::TextEdit::singleline(&mut self.single_line_text_input)
|
||||
.password(!self.show_password),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue