WidgetGallery: hide spinner widget to save CPU in reactive mode
This commit is contained in:
parent
9df0c68a38
commit
76ac41f9b5
1 changed files with 5 additions and 8 deletions
|
@ -208,10 +208,11 @@ impl WidgetGallery {
|
||||||
ui.add(doc_link_label("CollapsingHeader", "collapsing"));
|
ui.add(doc_link_label("CollapsingHeader", "collapsing"));
|
||||||
ui.collapsing("Click to see what is hidden!", |ui| {
|
ui.collapsing("Click to see what is hidden!", |ui| {
|
||||||
ui.horizontal_wrapped(|ui| {
|
ui.horizontal_wrapped(|ui| {
|
||||||
ui.label(
|
ui.spacing_mut().item_spacing.x = 0.0;
|
||||||
"Not much, as it turns out - but here is a gold star for you for checking:",
|
ui.label("It's a ");
|
||||||
);
|
ui.add(doc_link_label("Spinner", "spinner"));
|
||||||
ui.colored_label(egui::Color32::GOLD, "☆");
|
ui.add_space(4.0);
|
||||||
|
ui.add(egui::Spinner::new());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
|
@ -229,10 +230,6 @@ impl WidgetGallery {
|
||||||
This toggle switch is just 15 lines of code.",
|
This toggle switch is just 15 lines of code.",
|
||||||
);
|
);
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
|
|
||||||
ui.add(doc_link_label("Spinner", "spinner"));
|
|
||||||
ui.add(egui::Spinner::new());
|
|
||||||
ui.end_row();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue