Improve the UI for changing the egui theme (#4257)
I added a new demo - a `Frame` editor:  This whole menu is now just a a bit nicer to use: <img width="406" alt="Screenshot 2024-03-28 at 09 49 16" src="https://github.com/emilk/egui/assets/1148717/32d12067-7cf0-4312-aa12-42909a5ed5ac">
This commit is contained in:
@@ -43,13 +43,27 @@ impl Default for PaintBezier {
|
||||
impl PaintBezier {
|
||||
pub fn ui_control(&mut self, ui: &mut egui::Ui) {
|
||||
ui.collapsing("Colors", |ui| {
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Fill color:");
|
||||
ui.color_edit_button_srgba(&mut self.fill);
|
||||
});
|
||||
egui::stroke_ui(ui, &mut self.stroke, "Curve Stroke");
|
||||
egui::stroke_ui(ui, &mut self.aux_stroke, "Auxiliary Stroke");
|
||||
egui::stroke_ui(ui, &mut self.bounding_box_stroke, "Bounding Box Stroke");
|
||||
Grid::new("colors")
|
||||
.num_columns(2)
|
||||
.spacing([12.0, 8.0])
|
||||
.striped(true)
|
||||
.show(ui, |ui| {
|
||||
ui.label("Fill color");
|
||||
ui.color_edit_button_srgba(&mut self.fill);
|
||||
ui.end_row();
|
||||
|
||||
ui.label("Curve Stroke");
|
||||
ui.add(&mut self.stroke);
|
||||
ui.end_row();
|
||||
|
||||
ui.label("Auxiliary Stroke");
|
||||
ui.add(&mut self.aux_stroke);
|
||||
ui.end_row();
|
||||
|
||||
ui.label("Bounding Box Stroke");
|
||||
ui.add(&mut self.bounding_box_stroke);
|
||||
ui.end_row();
|
||||
});
|
||||
});
|
||||
|
||||
ui.collapsing("Global tessellation options", |ui| {
|
||||
|
||||
Reference in New Issue
Block a user