refactor: reduce border width for various UI components

This commit is contained in:
Kingkor Roy Tirtho 2026-07-03 17:08:09 +06:00
parent 15790d63a6
commit a869835628
5 changed files with 10 additions and 10 deletions

View File

@ -210,7 +210,7 @@ fun <T> AutocompleteTextField(
.then(textFieldShadow(AutocompleteTextFieldShape, isFocused, colors))
.clip(AutocompleteTextFieldShape)
.background(gradient, AutocompleteTextFieldShape)
.border(BorderStroke(1.5.dp, border), AutocompleteTextFieldShape)
.border(BorderStroke(.5.dp, border), AutocompleteTextFieldShape)
.drawWithCache {
val highlightBrush = Brush.verticalGradient(
colors = listOf(colors.highlight, Color.Transparent),

View File

@ -255,7 +255,7 @@ fun OutlineButton(
.then(buttonShadow(shape, isPressed, primary = false, colors, hovered = isHovered))
.clip(shape)
.background(gradient, shape)
.border(BorderStroke(1.5.dp, border), shape)
.border(BorderStroke(0.5.dp, border), shape)
.clickable(
enabled = enabled,
interactionSource = interactionSource,
@ -312,7 +312,7 @@ fun PrimaryButton(
.then(buttonShadow(shape, isPressed, primary = true, colors, hovered = isHovered))
.clip(shape)
.background(gradient, shape)
.border(BorderStroke(1.5.dp, colors.accent), shape)
.border(BorderStroke(0.5.dp, colors.accent), shape)
.clickable(
enabled = enabled,
interactionSource = interactionSource,
@ -372,7 +372,7 @@ fun SecondaryButton(
.clip(shape)
.background(gradient, shape)
.border(
BorderStroke(1.5.dp, colors.secondaryContainer.copy(alpha = 0.5f)),
BorderStroke(0.5.dp, colors.secondaryContainer.copy(alpha = 0.5f)),
shape,
)
.clickable(
@ -582,7 +582,7 @@ fun ButtonGroup(
.then(buttonShadow(GroupShape, pressed = false, primary = false, colors, hovered = false)),
shape = GroupShape,
color = Color.Transparent,
border = BorderStroke(1.5.dp, colors.border),
border = BorderStroke(0.5.dp, colors.border),
) {
Box(
modifier = Modifier.background(outlinedGradient(colors, false), GroupShape),
@ -599,7 +599,7 @@ fun ButtonGroupDivider() {
val colors = rememberButtonColors()
Box(
modifier = Modifier
.width(1.5.dp)
.width(1.dp)
.heightIn(min = 20.dp)
.background(colors.border),
)

View File

@ -96,7 +96,7 @@ fun CheckBox(
isFilled -> colors.accent
else -> colors.border
}
val borderWidth = if (isFilled) 1.5.dp else 1.5.dp
val borderWidth = 0.5.dp
val shadowElevation = when {
isPressed -> 1.dp

View File

@ -142,7 +142,7 @@ fun TextField(
.then(textFieldShadow(TextFieldShape, isFocused, colors))
.clip(TextFieldShape)
.background(gradient, TextFieldShape)
.border(BorderStroke(1.5.dp, border), TextFieldShape)
.border(BorderStroke(0.5.dp, border), TextFieldShape)
.drawWithCache {
val highlightBrush = Brush.verticalGradient(
colors = listOf(colors.highlight, Color.Transparent),

View File

@ -272,8 +272,8 @@ private fun HomeSection(
modifier = modifier.fillMaxWidth(),
verticalArrangement = Arrangement.spacedBy(12.dp),
) {
Text(
text = subtitle ?: "",
if (!subtitle.isNullOrEmpty()) Text(
text = subtitle,
style = MaterialTheme.typography.labelMedium.copy(
color = MaterialTheme.colorScheme.secondary,
fontWeight = FontWeight.Medium,