Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

egui_extras::TableBuilder cells have an interaction area larger than the visual content if clipping is disabled #5541

Open
JaniM opened this issue Dec 29, 2024 · 0 comments
Labels
bug Something is broken

Comments

@JaniM
Copy link

JaniM commented Dec 29, 2024

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:
image
image

With column clipping enabled:
image

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
@JaniM JaniM added the bug Something is broken label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant