mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Minor cleanup of the demo code
This commit is contained in:
@@ -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),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user