Browse Source

[grid] Make striped slightly wider than contents

pull/115/head
Emil Ernerfeldt 4 years ago
parent
commit
6d5eaeeafa
  1. 1
      egui/src/grid.rs

1
egui/src/grid.rs

@ -132,6 +132,7 @@ impl GridLayout {
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 rect = rect.expand2(2.0 * Vec2::X); // HACK: just looks better with some spacing on the sides
let color = Rgba::from_white_alpha(0.0075);
// let color = Rgba::from_black_alpha(0.2);
painter.rect_filled(rect, 2.0, color);

Loading…
Cancel
Save