forked from omni/OmniCards
redesign: updated card buttons style on WearOS
This commit is contained in:
@@ -33,7 +33,7 @@ fun CardButton(cardInfo: CardInfo) {
|
||||
Button(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer
|
||||
containerColor = (if (cardInfo.color == null) MaterialTheme.colorScheme.primaryContainer else Color(cardInfo.color.toColorInt())).copy(0.425f)
|
||||
),
|
||||
contentPadding = PaddingValues(0.dp),
|
||||
onClick = {
|
||||
@@ -50,17 +50,6 @@ fun CardButton(cardInfo: CardInfo) {
|
||||
.height(IntrinsicSize.Min)
|
||||
.clip(ButtonDefaults.shape)
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxHeight()
|
||||
.width(32.dp)
|
||||
.background(
|
||||
if (cardInfo.color == null)
|
||||
MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.625f)
|
||||
else
|
||||
Color(cardInfo.color.toColorInt()).copy(alpha = 0.625f)
|
||||
)
|
||||
)
|
||||
Text(
|
||||
cardInfo.name,
|
||||
fontSize = 16.sp,
|
||||
|
||||
Reference in New Issue
Block a user