From d036496d2fed360d23b75e573dc4331105c81afd Mon Sep 17 00:00:00 2001 From: rainxchzed Date: Sun, 8 Mar 2026 11:00:40 +0500 Subject: [PATCH 1/2] Refactor HomeFilterChips and update selected category text color - Removed unused `isDarkTheme` parameter from `HomeCategoryItem` and its usage within `HomeFilterChips`. - Updated the selected category text color to use `MaterialTheme.colorScheme.onSurface` instead of `onPrimaryContainer` for better visual consistency. --- .../rainxch/home/presentation/components/HomeFilterChips.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/feature/home/presentation/src/commonMain/kotlin/zed/rainxch/home/presentation/components/HomeFilterChips.kt b/feature/home/presentation/src/commonMain/kotlin/zed/rainxch/home/presentation/components/HomeFilterChips.kt index 66c194cb2..e871cfe4f 100644 --- a/feature/home/presentation/src/commonMain/kotlin/zed/rainxch/home/presentation/components/HomeFilterChips.kt +++ b/feature/home/presentation/src/commonMain/kotlin/zed/rainxch/home/presentation/components/HomeFilterChips.kt @@ -252,7 +252,6 @@ fun LiquidGlassCategoryChips( category = category, isSelected = category == selectedCategory, onSelect = { onCategorySelected(category) }, - isDarkTheme = isDarkTheme, modifier = Modifier.weight(1f), onPositioned = { x, width -> itemPositions[index] = x to width @@ -276,7 +275,6 @@ private fun LiquidGlassCategoryChip( category: HomeCategory, isSelected: Boolean, onSelect: () -> Unit, - isDarkTheme: Boolean, modifier: Modifier = Modifier, onPositioned: suspend (x: Float, width: Float) -> Unit ) { @@ -301,7 +299,7 @@ private fun LiquidGlassCategoryChip( val textColor by animateColorAsState( targetValue = if (isSelected) { - MaterialTheme.colorScheme.onPrimaryContainer + MaterialTheme.colorScheme.onSurface } else { MaterialTheme.colorScheme.onSurface.copy(alpha = .65f) }, From 466c8955ee4e2dc43a21164416cd25f27c0e3ac7 Mon Sep 17 00:00:00 2001 From: rainxchzed Date: Sun, 8 Mar 2026 11:00:43 +0500 Subject: [PATCH 2/2] Refactor HomeFilterChips and update selected category text color - Removed unused `isDarkTheme` parameter from `HomeCategoryItem` and its usage within `HomeFilterChips`. - Updated the selected category text color to use `MaterialTheme.colorScheme.onSurface` instead of `onPrimaryContainer` for better visual consistency. --- .../rainxch/githubstore/app/navigation/BottomNavigation.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigation.kt b/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigation.kt index 54afcfee0..7b5ff8dca 100644 --- a/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigation.kt +++ b/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigation.kt @@ -385,9 +385,9 @@ private fun LiquidGlassTabItem( lineHeight = 12.sp ), color = if (isSelected) { - MaterialTheme.colorScheme.onPrimaryContainer - } else { MaterialTheme.colorScheme.onSurface + } else { + MaterialTheme.colorScheme.onSurface.copy(alpha = .7f) }, maxLines = 1 )