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

Shadow not working on PopupMenu normal panel #100290

Open
JekSun97 opened this issue Dec 11, 2024 · 3 comments
Open

Shadow not working on PopupMenu normal panel #100290

JekSun97 opened this issue Dec 11, 2024 · 3 comments

Comments

@JekSun97
Copy link
Contributor

JekSun97 commented Dec 11, 2024

Tested versions

4.3 stable, 4.4 dev6

System information

Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - Radeon RX 560 Series (Advanced Micro Devices, Inc.; 31.0.14001.45012) - Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz (4 Threads)

Issue description

Shadow does not work in PopupMenu, on normal panel.

Image

Steps to reproduce

Create a theme, change the PopupMenu panel in Normal, try adding a shadow

Minimal reproduction project (MRP)

bg.zip

@molingyu
Copy link

It seems that because PopMenu is directly inherited from viewport. This causes it to use an independent viewport.
The viewport is clipped directly according to the size of the control, but the shadow exceeds the size of the control. This causes the shadow to be clipped. This means that not only the shadow. Any other effects that cause the control to exceed the original position will be clipped by the shadow.

By the way, I am curious about how the related effects will be performed if the native window is used (e.g. display/window/subwindows/embed_subwindows is false).

@molingyu
Copy link

Menu 是直接从 viewport 继承的。这会导致它使用独立的视区。

I just tested that if you use a native sub-window (display/window/subwindows/embed_subwindows is false), not only the shadow, but also the background color set by the theme will fail.

@molingyu
Copy link

#91333

I found a fix pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants