emilk / emilk/egui

`Area::constrain_to` clips shadow

Open
#3,552 1 comment 0 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**

When using `Area::constrain_to`, the shadow gets clipped if close to the edge.

This seems to be cause by [this `intersect` call](https://github.com/juancampa/egui/blob/997db9aec951c92ef2132272fde25057739d7c87/crates/egui/src/containers/area.rs#L415
).

**To Reproduce**
Steps to reproduce the behavior:
1. Add a `constrain_to` to an `Area`
2. Move that area to the edge of the constrained area

**Expected behavior**
Shadow never gets clipped.

**Screenshots**

Screenshot 2023-11-15 at 10 47 28 AM

In this video you can see how the shadow gets clipped when it reaches the `constrain_to` rect:

https://github.com/emilk/egui/assets/1410520/c2b660e2-43bd-4c05-b9fe-59adc598cc91

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.