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

Blur API #747

Closed
wants to merge 3 commits into from
Closed

Blur API #747

wants to merge 3 commits into from

Conversation

lenemter
Copy link
Member

@lenemter lenemter commented Mar 6, 2025

@lenemter lenemter mentioned this pull request Mar 6, 2025
1 task
@danirabbit
Copy link
Member

I don't really know about making this a part of Granite. I think it makes sense to use transparent elements for the shell, but I'm not sure about for arbitrary applications

@stsdc
Copy link
Member

stsdc commented Mar 6, 2025

I might use this in Monitor to put labels over charts. Currently it's just semi-transparent.
obraz
The key is to not overuse that, so guidelines will be needed.

@danirabbit
Copy link
Member

@stsdc this is for compositor blur. It wouldn't do anything inside of your app

@stsdc
Copy link
Member

stsdc commented Mar 6, 2025

If the API is not meant to be used by apps then it shouldn't be here.
Though, I would appreciate to have a such API. I see Granite.BlurSurface possible use in Dock, so it might be used for label background, or am I wrong?

@lenemter
Copy link
Member Author

lenemter commented Mar 6, 2025

@danirabbit I don't think introducing a feature (blur in this case) for one shell element is a good idea, considering it requires a lot of new code. And what's wrong with giving access to background blur to any app? I know it can lead to problems with contrast for example, but since we review every app in AppCenter, we can add guidelines and requirement for it

@danirabbit
Copy link
Member

@lenemter I think it makes sense to also use it in the panel for busy wallpapers, maybe in future versions of quick settings and applications menu, and there's other shell elements that could use it possibly like alt + tab, but I'm personally 👎 on compositor blur in apps

I think this also introduces an app platform problem in our cross-distro story for AppCenter. If developers start writing apps expecting compositor blur, their apps will be illegible when used in other desktops. I'm also imagining this requires new sandbox holes

At the very least I think we should explore this ourselves in the shell first as part of pantheon-wayland and wait to expose it to app developers until maybe there's an upstreamed compositor blur protocol

@danirabbit
Copy link
Member

@stsdc this is a window manager API for blurring behind a transparent window. It can't create blurs in between widgets inside your app. It's a compositor effect.

GTK.CSS does have blur filters for making blurs inside your app. I'm not sure how that works (or doesn't) with animated backgrounds but for example this is used in Warble on the game over screen https://appcenter.elementary.io/com.github.avojak.warble/

@lenemter
Copy link
Member Author

lenemter commented Mar 6, 2025

@danirabbit Makes sense. I see a way to mitigate issues you mention, but it will require a lot of work on stuff like portals, exposing power saving options or whether user wants to use blur at all. It's a complex work and I agree here. Maybe we can revisit this topic during OS 9 development when we have more freedom on what we can implement without breaking everything.

@danirabbit
Copy link
Member

@lenemter that sounds good to me and I think we'll have a better idea of the problems/limitations as well

@lenemter lenemter closed this Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants