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

Get prefers accent color from AccountsService #483

Merged
merged 1 commit into from
Apr 20, 2021

Conversation

meisenzahl
Copy link
Member

@meisenzahl meisenzahl commented Apr 10, 2021

Copy link
Member

@JoseExposito JoseExposito left a comment

Choose a reason for hiding this comment

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

This looks great 🎉 Just a question about the name of the colors in the API and a paranoid check.

}
});
} catch (Error e) {
critical (e.message);
Copy link
Member

Choose a reason for hiding this comment

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

It is very unlikely, but if GLib.Bus.get_proxy_sync fails, prefers_accent_color will return null.

I'm not sure which accent color is going to be the default one, but maybe we should fallback to it on error when _prefers_accent_color == null.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not quite sure. I simply copied and modified the code for ColorScheme 🤓️

lib/Widgets/Settings.vala Show resolved Hide resolved
@meisenzahl meisenzahl marked this pull request as ready for review April 13, 2021 06:54
@cassidyjames cassidyjames merged commit a95c546 into master Apr 20, 2021
@cassidyjames cassidyjames deleted the get-prefers-accent-color-from-accountsservice branch April 20, 2021 01:27
danirabbit added a commit that referenced this pull request May 3, 2021
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.

Expose accent color in Granite.Settings
3 participants