mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-08-05 19:59:51 +00:00
refactor: reduce border width for various UI components
This commit is contained in:
parent
15790d63a6
commit
a869835628
@ -210,7 +210,7 @@ fun <T> AutocompleteTextField(
|
|||||||
.then(textFieldShadow(AutocompleteTextFieldShape, isFocused, colors))
|
.then(textFieldShadow(AutocompleteTextFieldShape, isFocused, colors))
|
||||||
.clip(AutocompleteTextFieldShape)
|
.clip(AutocompleteTextFieldShape)
|
||||||
.background(gradient, AutocompleteTextFieldShape)
|
.background(gradient, AutocompleteTextFieldShape)
|
||||||
.border(BorderStroke(1.5.dp, border), AutocompleteTextFieldShape)
|
.border(BorderStroke(.5.dp, border), AutocompleteTextFieldShape)
|
||||||
.drawWithCache {
|
.drawWithCache {
|
||||||
val highlightBrush = Brush.verticalGradient(
|
val highlightBrush = Brush.verticalGradient(
|
||||||
colors = listOf(colors.highlight, Color.Transparent),
|
colors = listOf(colors.highlight, Color.Transparent),
|
||||||
|
|||||||
@ -255,7 +255,7 @@ fun OutlineButton(
|
|||||||
.then(buttonShadow(shape, isPressed, primary = false, colors, hovered = isHovered))
|
.then(buttonShadow(shape, isPressed, primary = false, colors, hovered = isHovered))
|
||||||
.clip(shape)
|
.clip(shape)
|
||||||
.background(gradient, shape)
|
.background(gradient, shape)
|
||||||
.border(BorderStroke(1.5.dp, border), shape)
|
.border(BorderStroke(0.5.dp, border), shape)
|
||||||
.clickable(
|
.clickable(
|
||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
interactionSource = interactionSource,
|
interactionSource = interactionSource,
|
||||||
@ -312,7 +312,7 @@ fun PrimaryButton(
|
|||||||
.then(buttonShadow(shape, isPressed, primary = true, colors, hovered = isHovered))
|
.then(buttonShadow(shape, isPressed, primary = true, colors, hovered = isHovered))
|
||||||
.clip(shape)
|
.clip(shape)
|
||||||
.background(gradient, shape)
|
.background(gradient, shape)
|
||||||
.border(BorderStroke(1.5.dp, colors.accent), shape)
|
.border(BorderStroke(0.5.dp, colors.accent), shape)
|
||||||
.clickable(
|
.clickable(
|
||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
interactionSource = interactionSource,
|
interactionSource = interactionSource,
|
||||||
@ -372,7 +372,7 @@ fun SecondaryButton(
|
|||||||
.clip(shape)
|
.clip(shape)
|
||||||
.background(gradient, shape)
|
.background(gradient, shape)
|
||||||
.border(
|
.border(
|
||||||
BorderStroke(1.5.dp, colors.secondaryContainer.copy(alpha = 0.5f)),
|
BorderStroke(0.5.dp, colors.secondaryContainer.copy(alpha = 0.5f)),
|
||||||
shape,
|
shape,
|
||||||
)
|
)
|
||||||
.clickable(
|
.clickable(
|
||||||
@ -582,7 +582,7 @@ fun ButtonGroup(
|
|||||||
.then(buttonShadow(GroupShape, pressed = false, primary = false, colors, hovered = false)),
|
.then(buttonShadow(GroupShape, pressed = false, primary = false, colors, hovered = false)),
|
||||||
shape = GroupShape,
|
shape = GroupShape,
|
||||||
color = Color.Transparent,
|
color = Color.Transparent,
|
||||||
border = BorderStroke(1.5.dp, colors.border),
|
border = BorderStroke(0.5.dp, colors.border),
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier.background(outlinedGradient(colors, false), GroupShape),
|
modifier = Modifier.background(outlinedGradient(colors, false), GroupShape),
|
||||||
@ -599,7 +599,7 @@ fun ButtonGroupDivider() {
|
|||||||
val colors = rememberButtonColors()
|
val colors = rememberButtonColors()
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.width(1.5.dp)
|
.width(1.dp)
|
||||||
.heightIn(min = 20.dp)
|
.heightIn(min = 20.dp)
|
||||||
.background(colors.border),
|
.background(colors.border),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -96,7 +96,7 @@ fun CheckBox(
|
|||||||
isFilled -> colors.accent
|
isFilled -> colors.accent
|
||||||
else -> colors.border
|
else -> colors.border
|
||||||
}
|
}
|
||||||
val borderWidth = if (isFilled) 1.5.dp else 1.5.dp
|
val borderWidth = 0.5.dp
|
||||||
|
|
||||||
val shadowElevation = when {
|
val shadowElevation = when {
|
||||||
isPressed -> 1.dp
|
isPressed -> 1.dp
|
||||||
|
|||||||
@ -142,7 +142,7 @@ fun TextField(
|
|||||||
.then(textFieldShadow(TextFieldShape, isFocused, colors))
|
.then(textFieldShadow(TextFieldShape, isFocused, colors))
|
||||||
.clip(TextFieldShape)
|
.clip(TextFieldShape)
|
||||||
.background(gradient, TextFieldShape)
|
.background(gradient, TextFieldShape)
|
||||||
.border(BorderStroke(1.5.dp, border), TextFieldShape)
|
.border(BorderStroke(0.5.dp, border), TextFieldShape)
|
||||||
.drawWithCache {
|
.drawWithCache {
|
||||||
val highlightBrush = Brush.verticalGradient(
|
val highlightBrush = Brush.verticalGradient(
|
||||||
colors = listOf(colors.highlight, Color.Transparent),
|
colors = listOf(colors.highlight, Color.Transparent),
|
||||||
|
|||||||
@ -272,8 +272,8 @@ private fun HomeSection(
|
|||||||
modifier = modifier.fillMaxWidth(),
|
modifier = modifier.fillMaxWidth(),
|
||||||
verticalArrangement = Arrangement.spacedBy(12.dp),
|
verticalArrangement = Arrangement.spacedBy(12.dp),
|
||||||
) {
|
) {
|
||||||
Text(
|
if (!subtitle.isNullOrEmpty()) Text(
|
||||||
text = subtitle ?: "",
|
text = subtitle,
|
||||||
style = MaterialTheme.typography.labelMedium.copy(
|
style = MaterialTheme.typography.labelMedium.copy(
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = MaterialTheme.colorScheme.secondary,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user