-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Utils: add force_elementary_style () #486
Conversation
I suppose maybe this should be "force" instead of just "use"? |
@danrabbit yeah that's probably fair. I was kind of mixed since |
I'm also unsure if I should handle the variant thing here or ignore if for now; I figured it might be nice to consider forcing a specific variant, but if that's too much scope creep, I'm fine dropping it. |
Maybe we want to manage the notify signal here? with elementary/calculator#177 if i start the program with the elementary stylesheet and change to other theme they will fallback to Adwaita. If i start with Adwaita, the theme is frozen on io.elementary.blueberry ever if i set the theme to any stylesheet theme. |
I thought about that but honestly supporting changing to/from/between non-elementary stylesheets on the fly is much less of a concern since that's already pretty janky in Flatpak apps to begin with; I mainly want to support the case where you are on elementary OS or at least using the elementary stylesheet (so we don't change anything and just use the stylesheet as-is) or are not on elementary stylesheet so we just force a specific one. I think this PR does the least amount of work to get that working satisfactorily. |
I do wonder if it makes sense to check this against a list of valid variants instead of just allowing any arbitrary string; maybe we accept a |
I don't think setting a variant here is necessary now, apps that use fixed accent are already doing it with |
@Marukesu yep that was my conclusion as well; I've removed that from this branch. |
If it's "force", I'd expect it to also track changes and not be a one-time thing. :) |
@Exalm I mean, see the previous comments in that vein. I was going to prefer |
Not bikeshed at all, what I mean is it can track changes as well instead of being a one-time thing. :) |
Co-authored-by: Daniel Foré <daniel@elementary.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good and works as intended afaict. Nice job :)
Turns elementary/calculator#177 into a one-liner.