From 061d093178712f2c45f20d746133d17d1ab886a9 Mon Sep 17 00:00:00 2001 From: korigamik-hypr Date: Sun, 15 Dec 2024 03:21:42 +0530 Subject: [PATCH] fix grids --- .../launcher2/ui/component/preferences/PreferenceScreen.kt | 2 -- .../mm20/launcher2/ui/launcher/search/common/grid/GridItem.kt | 2 +- .../de/mm20/launcher2/ui/launcher/sheets/HiddenItemsSheet.kt | 1 + .../ui/launcher/widgets/clock/parts/DatePartProvider.kt | 4 +--- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/component/preferences/PreferenceScreen.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/component/preferences/PreferenceScreen.kt index 07978dfd0..10172fad2 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/component/preferences/PreferenceScreen.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/component/preferences/PreferenceScreen.kt @@ -38,10 +38,8 @@ import androidx.compose.ui.input.nestedscroll.NestedScrollSource import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalViewConfiguration -import androidx.compose.ui.platform.ViewConfiguration import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp -import com.google.accompanist.systemuicontroller.rememberSystemUiController import de.mm20.launcher2.ui.locals.LocalNavController diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/common/grid/GridItem.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/common/grid/GridItem.kt index c309856f0..6db86088b 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/common/grid/GridItem.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/common/grid/GridItem.kt @@ -228,7 +228,7 @@ fun GridItem( .boundsInWindow() .roundToIntRect() }, - size = LocalGridSettings.current.iconSize.dp - 2.dp, + size = LocalGridSettings.current.iconSize.dp, badge = { badge }, icon = { icon }, ) diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/HiddenItemsSheet.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/HiddenItemsSheet.kt index 2e7eb3b8c..2dc213a55 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/HiddenItemsSheet.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/HiddenItemsSheet.kt @@ -49,6 +49,7 @@ fun HiddenItemsSheet( SearchResultGrid( items, + showList = false, modifier = Modifier .verticalScroll(rememberScrollState()) .padding(it) diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/widgets/clock/parts/DatePartProvider.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/widgets/clock/parts/DatePartProvider.kt index ee6d40c15..c5a92261b 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/widgets/clock/parts/DatePartProvider.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/widgets/clock/parts/DatePartProvider.kt @@ -29,9 +29,7 @@ class DatePartProvider : PartProvider { val verticalLayout = !compactLayout val context = LocalContext.current TextButton( - colors = ButtonDefaults.textButtonColors( - contentColor = LocalContentColor.current - ), + colors = ButtonDefaults.textButtonColors(contentColor = MaterialTheme.colorScheme.onPrimaryContainer), onClick = { val startMillis = System.currentTimeMillis() val builder = CalendarContract.CONTENT_URI.buildUpon()