elementary / granite

Library that extends GTK with common widgets and utilities
https://elementary.io
GNU Lesser General Public License v3.0
286 stars 60 forks source link

Init: load gresourced styles if present #644

Closed danirabbit closed 1 year ago

danirabbit commented 1 year ago

Fixes #643

Try to find a style.css file and if it exists, add it as an APPLICATION priority

Marukesu commented 1 year ago

I believe this would make epiphany load they style.css, maybe style-elementary.css like epiphany does, or the Application.css that's already used by elementary apps should be a better name.

alice-mkh commented 1 year ago

It would, yeah. Not nice that there is a name clash, but not a lot we can do here. :(

Any reason not to have a dark variant as well? libadwaita does have that too

danirabbit commented 1 year ago

@Marukesu @Exalm Yeah maybe we can check for Application.css or style-elementary.css first and then try style.css if it isn't available? The problem is that for apps like font viewer, we need the padding etc that they provide in their style.css

@Exalm I just wanted to get the minimum in here first and then come back in a separate branch for dark style loading since it introduces quite a bit more complexity

Marukesu commented 1 year ago

In the font viewer case, could we patch the gresource file to alias the style.css to the expected name by granite?

danirabbit commented 1 year ago

Ah yeah that's true. In that case, I'll change this to look for Application.css which is the convention we've been using so far in our apps