Adanos020 / egui_dock

Docking support for egui – an immediate-mode GUI library for Rust
MIT License
458 stars 75 forks source link

Content overlaps with another tab #233

Closed lnenad closed 4 months ago

lnenad commented 8 months ago

Describe the bug I have an area that is manually positioned that contains a button. When I split the tabs horizontally so they sit one on top of another and resize so that button should become hidden by the bottom tab, the button stays visible and on top of the content from the bottom tab.

Expected behavior The content of the manually positioned area should be hidden by the overlapping tab background.

Screenshots

Before resize:

image

After resize:

image

You see the button is still visible even though it should be clipped by the lower tab background.

Adanos020 commented 7 months ago

Hey, if you're placing a widget manually, then it can't be clipped. Instead, consider using ui.horizontal() and putting a ui.add_space(amount) before the button. You can get the amount of horizontal space left using ui.available_width().

Let me know if that helps.