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

gpui: Drop shadows with no blur are not rendered #22433

Open
1 task done
iamnbutler opened this issue Dec 26, 2024 · 1 comment · May be fixed by #22441
Open
1 task done

gpui: Drop shadows with no blur are not rendered #22433

iamnbutler opened this issue Dec 26, 2024 · 1 comment · May be fixed by #22441
Labels
bug [core label] gpui GPUI rendering framework support

Comments

@iamnbutler
Copy link
Member

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Render the following element:

fn base() -> Div {
        div()
            .size_16()
            .bg(rgb(0xffffff))
            .rounded_full()
            .border_1()
            .border_color(hsla(0.0, 0.0, 0.0, 0.1))
            .shadow(smallvec![BoxShadow {
                color: hsla(0.0, 0.0, 0.0, 0.3),
                offset: point(px(0.), px(8.)),
                blur_radius: px(0.),
                spread_radius: px(0.),
            }])
    }

You would expect a shadow size_16 in size, 8px offset on the y axis, with no blur.

Instead, no shadow renders at all:

CleanShot 2024-12-26 at 14 00 38@2x

Zed Version and System Specs

N/A - GPUI

If applicable, add screenshots or screencasts of the incorrect state / behavior

N/A

If applicable, attach your Zed.log file to this issue.

N/A - GPUI

@iamnbutler iamnbutler added bug [core label] gpui GPUI rendering framework support labels Dec 26, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 26, 2024
This PR adds a more comprehensive shadow example to gpui:

![CleanShot 2024-12-26 at 13 54
05@2x](https://github.com/user-attachments/assets/452fb8a1-d294-4b56-b0e0-f4e4ca6c29d4)

This is prep to work on the following issues:

- Shadows with a blur of 0 do not render. Expected: A shadow with sharp
edges (#22433)
- Spread does not correctly conform to the shape the shadow is cast from

Release Notes:

- N/A
@iamnbutler
Copy link
Member Author

Have a pending fix for this:

CleanShot 2024-12-26 at 22 33 51@2x

@iamnbutler iamnbutler linked a pull request Dec 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] gpui GPUI rendering framework support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant