egui_extras::TableBuilder cells have an interaction area larger than the visual content if clipping is disabled
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
Describe the bug
egui_extras::TableBuilder cells have an interaction area larger than the visual content if clipping is disabled. This happens both in 0.30.0 and master.
To illustrate:
With column clipping enabled:
To Reproduce
ctx.style_mut(|style| {
style.debug.show_widget_hits = true;
});
egui::Window::new("Test").show(ctx, |ui| {
egui_extras::TableBuilder::new(ui)
.sense(egui::Sense::click())
.column(egui_extras::Column::remainder().clip(false)) // Switch to true to fix
.column(egui_extras::Column::auto().clip(false)) // Switch to true to fix
.header(20.0, |mut header| {
header.col(|ui| {
ui.heading("Column 1");
});
header.col(|ui| {
ui.heading("Column q");
});
})
.body(|body| {
body.rows(30.0, 3, |mut row| {
row.col(|ui| {
ui.label("Cell 1");
});
row.col(|ui| {
ui.label("Cell 2");
});
});
});
});
Expected behavior
I expect the interaction area to be equivalent to the normal allocated visual region regardless of clipping.
Desktop (please complete the following information):
- OS: MacOS
- Browser: using eframe 0.30.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided egui_extras::TableBuilder reproduction, focusing on the .sense(egui::Sense::click()) setup and columns using .clip(false). Compare the interaction area with clipping enabled and disabled, then verify that the disabled-clipping case matches the normal visual region without regressing the enabled case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100