forked from omni/OmniCards
redesign: updated card buttons style on WearOS
This commit is contained in:
@@ -34,6 +34,9 @@ android {
|
|||||||
"proguard-rules.pro"
|
"proguard-rules.pro"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
debug {
|
||||||
|
applicationIdSuffix = ".debug"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ fun CardButton(cardInfo: CardInfo) {
|
|||||||
Button(
|
Button(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
colors = ButtonDefaults.buttonColors(
|
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),
|
contentPadding = PaddingValues(0.dp),
|
||||||
onClick = {
|
onClick = {
|
||||||
@@ -50,17 +50,6 @@ fun CardButton(cardInfo: CardInfo) {
|
|||||||
.height(IntrinsicSize.Min)
|
.height(IntrinsicSize.Min)
|
||||||
.clip(ButtonDefaults.shape)
|
.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(
|
Text(
|
||||||
cardInfo.name,
|
cardInfo.name,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
|
|||||||
Reference in New Issue
Block a user