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

Init: load gresourced styles if present #644

Merged
merged 4 commits into from
Apr 26, 2023
Merged

Conversation

danirabbit
Copy link
Member

Fixes #643

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

@danirabbit danirabbit requested a review from a team April 7, 2023 23:04
@Marukesu
Copy link
Contributor

Marukesu commented Apr 8, 2023

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
Copy link
Contributor

alice-mkh commented Apr 8, 2023

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
Copy link
Member Author

@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
Copy link
Contributor

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

@danirabbit
Copy link
Member Author

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

Copy link
Contributor

@Marukesu Marukesu left a comment

Choose a reason for hiding this comment

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

LGTM.

@danirabbit danirabbit merged commit 2b6d520 into main Apr 26, 2023
@danirabbit danirabbit deleted the init-load-resource-styles branch April 26, 2023 17:11
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.

Adw apps don't automatically load styles with Granite.init ()
4 participants