ComposeGears / ComposeGears/Valkyrie
[Preview] contextual tint
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 889
- Forks
- 26
- Avg merge
- 36m
- Merged PRs (30d)
- 2
Description
I have currently a set of icons which are driven by external tint...
internal fun AppIcons.Influences.acidReflux(tintColor: Color): ImageVector =
ImageVector.Builder(
name = "acid-reflux",
defaultWidth = 24.dp,
defaultHeight = 24.dp,
viewportWidth = 24f,
viewportHeight = 24f,
).apply {
path(fill = SolidColor(tintColor)) {
...
}
path(fill = SolidColor(Color.White)) {
...
}
}.build()
apparently this fails, because it needs a color,
- deafult argument for tintColor should work
- a color picker for this would nice...
and then having this
val AppIcons.Remedies.AirPurifier: ImageVector
get() {
_airPurifier?.let { return it }
return AppIcons.Influences.airPurifier(Color(0xFFFF0000)).also { _airPurifier = it }
}
private var _airPurifier: ImageVector? = null
doesn't work, with "no preview found"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the no-preview-found behavior with the parameterized ImageVector and cached AirPurifier examples in the issue. Inspect the previewer entry point and its handling of icon parameters and generated properties; done means tint-driven icons can preview with a default or selected color.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100