Fix uneven table striping (#1680)

* Fix uneven table striping

* simplify the code

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
Michael Birdhouse 2022-06-22 06:33:51 -04:00 committed by GitHub
parent bd5f553c3a
commit 1a89cb35e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,7 @@ impl<'l> StripLayout<'l> {
let rect = self.cell_rect(&width, &height);
// Make sure we don't have a gap in the stripe background:
let rect = rect.expand2(egui::vec2(0.5 * self.ui.spacing().item_spacing.x, 0.0));
let rect = rect.expand2(0.5 * self.ui.spacing().item_spacing);
self.ui
.painter()