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

ShadowEffect: Dont use Gtk to draw shadows #1867

Merged
merged 5 commits into from
May 28, 2024
Merged

Conversation

leolost2605
Copy link
Member

Basically reverts #250

Currently it's a regression since we can't do fancy shadow styles using CSS now. I'll try looking into fully supporting CSS box shadow properties but that might take a while

@danirabbit

This comment was marked as resolved.

@danirabbit danirabbit force-pushed the leolost/shadow-no-gtk branch from 988862c to 41fb322 Compare May 27, 2024 23:07
@danirabbit
Copy link
Member

@leolost2605 Okay I think this is probably good enough.

Instead of setting shadow spread, we just take in "css class" as a construction argument

Shadows are drawn with a rounded rectangle now and you can set border radius so that works much better for things like the workspace switcher that casts a very small shadow

The more shadow spread there is, the further we offset shadows on the y axis. So in other words if an object is high up on the Z axis, the shadow is cast further away from its origin

It's not 1:1 to shadows in the stylesheet but I don't think anyone will really notice

@danirabbit danirabbit marked this pull request as ready for review May 27, 2024 23:57
Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy if you're happy :)

@leolost2605
Copy link
Member Author

Let's go!

@leolost2605 leolost2605 merged commit f9e9eed into master May 28, 2024
2 of 4 checks passed
@leolost2605 leolost2605 deleted the leolost/shadow-no-gtk branch May 28, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants