1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 07:03:14 -04:00

Minor improvements

This commit is contained in:
Emil Ernerfeldt
2019-02-10 20:56:59 +01:00
parent 2583fd2c52
commit da6d590908
4 changed files with 45 additions and 17 deletions

View File

@@ -84,8 +84,9 @@ impl App {
.rect
.min();
let mut cmds = vec![];
for i in 0..self.num_boxes {
gui.add_graphic(GuiCmd::PaintCommands(vec![PaintCmd::Rect {
cmds.push(PaintCmd::Rect {
corner_radius: self.corner_radius,
fill_color: Some(srgba(136, 136, 136, 255)),
rect: Rect::from_min_size(
@@ -96,8 +97,9 @@ impl App {
width: self.stroke_width,
color: srgba(255, 255, 255, 255),
}),
}]));
});
}
gui.add_graphic(GuiCmd::PaintCommands(cmds));
});
}
}