emilk / emilk/egui

Grid stripes aren't the full grid width when column count is specified

Open
#3,928 2 comments 5 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 12h
Merged PRs (30d)
67

Description

**Describe the bug**
`striped(true)` and `num_columns(N)` `Grid` paints only the minimum row width, though description of `num_columns` says that the last column will extend to fill the Ui

**To Reproduce**
for example,
```rust
ScrollArea::vertical()
.max_width(f32::INFINITY)
.auto_shrink([false, false])
.show(ui, |ui| {
egui::Grid::new("event_list_grid")
.striped(true)
.num_columns(4)
.show(ui, |ui| {
// draw some rows here
});
});
```

**Expected behavior**
It should fill entire row if `num_columns` is set

**Screenshots**
![image](https://github.com/emilk/egui/assets/53968411/30a3dd11-5512-429c-addc-3392e768674a)
(Grid is directly in that ScrollArea, its max_rect is the rectangle of almost entire window)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.