-
Notifications
You must be signed in to change notification settings - Fork 31
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
Allow OptionSheet icons to be in colour #56
Comments
Did you try to add a tint of color, "Color.Unspecified" which according to the Icon component would not apply a tint to the icon? |
Hmm I just checked and this seems to work:
It's gray by default and the color is kept. When I use Color.RED, it's red. If I remove tint / keep it null, it uses the secondary color. I guess you are not using a DrawableRes? Maybe it doesn't work for each type atm. |
I was doing it as a painterResource before, but it's still like that even with drawableRes: if (imageSheetVisible) {
ModalBottomSheet(
onDismissRequest = { imageSheetVisible = false },
sheetState = imageSheetState
) {
OptionView(
useCaseState = rememberUseCaseState(),
selection = OptionSelection.Single(
options = listOf(
Option(
icon = IconSource(
drawableRes = R.drawable.image_anahata,
tint = Color.Unspecified
),
titleText = "",
)
),
onSelectOption = { index, option ->
}
),
config = OptionConfig(
mode = DisplayMode.GRID_VERTICAL,
)
)
}
} |
My example was with the header.
|
For the OptionView it makes sense if it doesn't work as it enforces currently the icon color.
|
Same as maxkeppeler/sheets#83 but for Compose dialogs.
There should be an option to keep the icon as is without any tinting at all.
I want the user to be able to choose an image but it looks like that rather than retaining all its colours.
The text was updated successfully, but these errors were encountered: