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

widget icons don't use theme colors #120

Closed
forrestguice opened this issue Nov 29, 2017 · 3 comments
Closed

widget icons don't use theme colors #120

forrestguice opened this issue Nov 29, 2017 · 3 comments

Comments

@forrestguice
Copy link
Owner

The sunrise/sunset/noon icons aren't themeable (sunrise/sunset theme colors are ignored by icons). v0.5.0

@forrestguice
Copy link
Owner Author

Implemented w/ v0.5.1 but only fixes problem for api 19+. For lower versions the sunrise/sunset icons still fail to apply the colors (but the noon icon is fixed).

The sunrise/sunset icons are InsetDrawable (wrapping a GradientDrawable), while the noon icon is a plain GradientDrawable. Applying the colors to InsetDrawable requires getting a reference to the wrapped drawable, but (apparently) InsetDrawable.getDrawable() was added api19 (and for lower versions there is no access).

So there doesn't seem to be an easy fix w/out reworking the rise/set icons. Using a layer-list drawable instead might be a possible solution (or might suffer from same problem as InsetDrawable). needs research.

@forrestguice
Copy link
Owner Author

v0.5.2 fixes this problem for api21, api23 (relates to #126).

@forrestguice forrestguice modified the milestones: v0.5.1, v0.5.2 Dec 21, 2017
@forrestguice
Copy link
Owner Author

LayerDrawable (layer-list) does seem to be the solution. The recently added moon phase icons (using layer-list) are successfully themed on api15. ..needs more testing, especially later api versions.

forrestguice added a commit that referenced this issue Feb 26, 2018
replace rise/set insetDrawables w/ layerDrawables; relates to #120.
@forrestguice forrestguice modified the milestones: v0.5.2, v0.7.1 Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant