Open razzeee opened 2 months ago
It seems like appcenter will always take the branding color without a scheme
https://github.com/elementary/appcenter/blob/f8db5192b69da0846fa9e62f789e15e0dbf0cf29/src/Core/Package.vala#L826
(I might just no be understanding vala)
Flathub apps will almost always have a scheme_preference that should be read instead. Those will look similar to the spec https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-branding
scheme_preference
<branding> <color type="primary" scheme_preference="light">#ff00ff</color> <color type="primary" scheme_preference="dark">#993d3d</color> </branding>
But you would also need to handle
<branding> <color type="primary" scheme_preference="light">#ff00ff</color> <color type="primary">#993d3d</color> </branding>
And this one, that's probably already working
<branding> <color type="primary">#993d3d</color> </branding>
If this is not done, we might run into comparability problems.
For e.g. we had an app with the following (kinda nonsensical definition)
<branding> <color type="primary">#f9c440</color> <color type="primary" scheme_preference="light">#d48e15</color> <color type="primary" scheme_preference="dark">#ffe16b</color> </branding>
Presumably cause they wanted it to work in flathub and appcenter.
https://github.com/ryonakano/konbucase/pull/128#issuecomment-2034641821
Parse all branding colors from appstream including the scheme_preference
No response
Hey, can i work on this issue? Thanks
@ausdauerer feel free to propose a branch! Thanks :pink_heart:
Problem
It seems like appcenter will always take the branding color without a scheme
https://github.com/elementary/appcenter/blob/f8db5192b69da0846fa9e62f789e15e0dbf0cf29/src/Core/Package.vala#L826
(I might just no be understanding vala)
Flathub apps will almost always have a
scheme_preference
that should be read instead. Those will look similar to the spec https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-brandingBut you would also need to handle
And this one, that's probably already working
If this is not done, we might run into comparability problems.
For e.g. we had an app with the following (kinda nonsensical definition)
Presumably cause they wanted it to work in flathub and appcenter.
https://github.com/ryonakano/konbucase/pull/128#issuecomment-2034641821
Proposal
Parse all branding colors from appstream including the
scheme_preference
Prior Art (Optional)
No response