1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

[grid] Make the stripes fairly sizes

This commit is contained in:
Emil Ernerfeldt
2021-01-15 18:18:21 +01:00
parent 8e1c7625f1
commit 17d88c8187

View File

@@ -122,6 +122,7 @@ impl GridLayout {
// Paint background for coming row:
let size = Vec2::new(self.prev_state.full_width(self.spacing.x), height);
let rect = Rect::from_min_size(*cursor, size);
let rect = rect.expand2(0.5 * self.spacing.y * Vec2::Y);
let color = Rgba::from_white_alpha(0.0075);
// let color = Rgba::from_black_alpha(0.2);
painter.rect_filled(rect, 2.0, color);