mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Clean up demos
This commit is contained in:
@@ -14,7 +14,6 @@ pub struct WidgetGallery {
|
||||
scalar: f32,
|
||||
string: String,
|
||||
color: egui::Color32,
|
||||
memory_example: String,
|
||||
}
|
||||
|
||||
impl Default for WidgetGallery {
|
||||
@@ -26,7 +25,6 @@ impl Default for WidgetGallery {
|
||||
scalar: 42.0,
|
||||
string: Default::default(),
|
||||
color: egui::Color32::LIGHT_BLUE.linear_multiply(0.5),
|
||||
memory_example: "qwerty_is_bad_password".to_owned(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,7 +86,6 @@ impl WidgetGallery {
|
||||
scalar,
|
||||
string,
|
||||
color,
|
||||
memory_example,
|
||||
} = self;
|
||||
|
||||
ui.set_enabled(*enabled);
|
||||
@@ -204,19 +201,6 @@ impl WidgetGallery {
|
||||
This toggle switch is just 15 lines of code.",
|
||||
);
|
||||
ui.end_row();
|
||||
|
||||
ui.hyperlink_to(
|
||||
"egui::Memory usage:",
|
||||
super::password::url_to_file_source_code(),
|
||||
)
|
||||
.on_hover_text(
|
||||
"You can use `egui::Memory` to store your own data.\n\
|
||||
And state of this widget can be saved and loaded \n\
|
||||
between runs automatically under the `persistence`\n\
|
||||
feature.",
|
||||
);
|
||||
ui.add(super::password::password(memory_example, "memory example"));
|
||||
ui.end_row();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user