Skip to content

Commit 27a7c0a

Browse files
committed
fix(ui): fix GridColumnChip glitch in display settings column picker
Remove redundant Modifier.clip() from Surface — Surface already clips via its shape parameter. Having clip before border caused the border to be drawn inside an already-clipped region, producing rendering artifacts most visible on the narrow single-column chip. Add widthIn(min = 56.dp) so the single-dot chip has a reasonable minimum width and all chips look visually balanced regardless of dot count.
1 parent 32dcfe8 commit 27a7c0a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

android/app/src/main/java/dev/dettmer/simplenotes/ui/settings/screens/DisplaySettingsScreen.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
1616
import androidx.compose.foundation.layout.height
1717
import androidx.compose.foundation.layout.padding
1818
import androidx.compose.foundation.layout.size
19+
import androidx.compose.foundation.layout.widthIn
1920
import androidx.compose.foundation.rememberScrollState
2021
import androidx.compose.foundation.shape.CircleShape
2122
import androidx.compose.foundation.shape.RoundedCornerShape
@@ -323,7 +324,7 @@ private fun GridColumnChip(columns: Int, selected: Boolean, onClick: () -> Unit)
323324
Surface(
324325
onClick = onClick,
325326
modifier = Modifier
326-
.clip(RoundedCornerShape(12.dp))
327+
.widthIn(min = 56.dp)
327328
.border(
328329
width = if (selected) 2.dp else 1.dp,
329330
color = borderColor,

0 commit comments

Comments
 (0)