mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-06-18 20:59:48 -04:00
Fix dynamic colors for category group icons
This commit is contained in:
@@ -29,6 +29,7 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.hideFromAccessibility
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.PreviewDynamicColors
|
||||
import androidx.compose.ui.tooling.preview.PreviewLightDark
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.navigation3.runtime.NavKey
|
||||
@@ -59,7 +60,7 @@ fun CategoryGroupRow(
|
||||
Icon(
|
||||
imageVector = group.imageVector,
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colorScheme.primary,
|
||||
tint = MaterialTheme.colorScheme.onPrimaryContainer,
|
||||
modifier = Modifier.semantics { hideFromAccessibility() },
|
||||
)
|
||||
}
|
||||
@@ -105,3 +106,17 @@ private fun Preview() {
|
||||
Column { CategoryGroupRow(CategoryGroups.productivity, categories) {} }
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
@PreviewDynamicColors
|
||||
private fun PreviewDynamicColors() {
|
||||
FDroidContent(dynamicColors = true) {
|
||||
val categories =
|
||||
listOf(
|
||||
CategoryItem("App Store & Updater", "App Store & Updater"),
|
||||
CategoryItem("Browser", "Browser"),
|
||||
CategoryItem("Calendar & Agenda", "Calendar & Agenda"),
|
||||
)
|
||||
Column { CategoryGroupRow(CategoryGroups.productivity, categories) {} }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3e6fec5c784a921bf2e1f6d3460e8b9815d437cd28f0b23c5ff0c0c5164418f8
|
||||
size 163366
|
||||
oid sha256:aa8325e0d16c5d113eaaf79bfeecb670de3f0abd213c2260355b1b24e463ab30
|
||||
size 163379
|
||||
|
||||
Reference in New Issue
Block a user