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

Revert adding force_elementary_style #501

Merged
merged 1 commit into from
May 14, 2021

Conversation

cassidyjames
Copy link
Contributor

@tintou requested we revert this and instead handle it in the Flatpak platform, which makes sense.

@danirabbit danirabbit merged commit 4507450 into master May 14, 2021
@danirabbit danirabbit deleted the revert-force-elementary-style branch May 14, 2021 22:48
@avojak
Copy link

avojak commented Jan 20, 2022

@cassidyjames What's the recommended way to accomplish this currently?

"handle it in the Flatpak platform" makes me think it should happen automatically for apps that are built against the elementary Flatpak platform?

@cassidyjames
Copy link
Contributor Author

cassidyjames commented Jan 20, 2022

@avojak I'll have to double check, but at the moment you can just manually set the stylesheet, and it will be available in the platform. I'd recommend something like this:

var gtk_settings = Gtk.Settings.get_default ();
gtk_settings.gtk_icon_theme_name = "elementary";
gtk_settings.gtk_theme_name = "io.elementary.stylesheet.blueberry";

You could also wrap that in a check if the current stylesheet starts with io.elementary.stylesheet. and only manually set it if it's false; that way you retain the accent colors on elementary OS.

@avojak
Copy link

avojak commented Jan 20, 2022

Awesome, yea I tested that last night by just copying the code used for force_elementary_style into my app and it worked great, but since there was a reason for it being removed from Granite I didn't necessarily want to go that route if there was a better way. Thanks!

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