Revert "fix grid"

This reverts commit 9f2f357256.
This commit is contained in:
MM20
2026-04-19 15:54:57 +02:00
parent ac45173797
commit 92c84faf14
3 changed files with 10 additions and 13 deletions

View File

@@ -4,9 +4,11 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyListScope
import androidx.compose.foundation.lazy.grid.LazyGridScope
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
@@ -50,7 +52,7 @@ fun LazyGridScope.AppResults(
showList: Boolean,
) {
val before = if (profiles.size > 1) {
@Composable {
@Composable {
Column(
verticalArrangement = if (reverse) Arrangement.BottomReversed else Arrangement.Top,
) {
@@ -208,7 +210,7 @@ fun LazyGridScope.AppResults(
.fillMaxWidth(),
item = app,
showDetails = showDetails,
onShowDetails = { onSelect(if (it) index else -1) },
onShowDetails = { onSelect(if(it) index else -1) },
highlight = highlightedItem?.key == app.key
)
},
@@ -220,17 +222,10 @@ fun LazyGridScope.AppResults(
items = if (isProfileLocked) emptyList() else apps,
before = before,
itemContent = {
val showLabels = LocalGridSettings.current.showLabels
GridItem(
item = it,
showLabels = showLabels,
highlight = it.key == highlightedItem?.key,
modifier = Modifier
.fillMaxWidth()
.padding(
top = 8.dp,
bottom = if (!showLabels) 8.dp else 0.dp,
)
showLabels = LocalGridSettings.current.showLabels,
highlight = it.key == highlightedItem?.key
)
},
reverse = reverse,

View File

@@ -111,7 +111,7 @@ fun GridItem(
Column(
modifier = modifier
.padding(start = 4.dp, end = 4.dp)
.padding(4.dp)
.combinedClickable(
onClick = {
if (!launchOnPress || !viewModel.launch(context, bounds)) {
@@ -124,7 +124,7 @@ fun GridItem(
},
indication = null,
interactionSource = remember { MutableInteractionSource() },
),
) then if (!showLabels) Modifier.aspectRatio(1f) else Modifier,
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center,
) {

View File

@@ -104,6 +104,8 @@ fun <T : SavableSearchable> LazyGridScope.GridResults(
.padding(
top = if (isFirstRow) 8.dp else 0.dp,
bottom = if (isLastRow) 8.dp else 0.dp,
start = if (columns == 1 || !isFirstInRow) 0.dp else 4.dp,
end = if (columns == 1 || !isLastInRow) 0.dp else 4.dp,
)
) {
Box(