Skip to content

Commit

Permalink
rearrange buttons to make them compact again
Browse files Browse the repository at this point in the history
  • Loading branch information
stvnrhodes committed Mar 11, 2024
1 parent 220cb7a commit cfa3b9c
Showing 1 changed file with 34 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,44 +168,6 @@ fun WearApp() {
modifier = iconModifier
)
}
}
}
item {
Row(modifier = contentModifier, horizontalArrangement = Arrangement.SpaceEvenly) {
Button(
modifier = Modifier.size(ButtonDefaults.SmallButtonSize),
onClick = {
sendPostRequest(
Execution(
command = "action.devices.commands.mute",
params = mapOf("mute" to true),
), context
)
},
) {
Icon(
imageVector = Icons.Rounded.VolumeOff,
contentDescription = "mute volume",
modifier = iconModifier
)
}
Button(
modifier = Modifier.size(ButtonDefaults.SmallButtonSize),
onClick = {
sendPostRequest(
Execution(
command = "action.devices.commands.volumeRelative",
params = mapOf("relativeSteps" to -1),
), context
)
},
) {
Icon(
imageVector = Icons.Rounded.VolumeDown,
contentDescription = "turn volume down",
modifier = iconModifier
)
}
Button(
modifier = Modifier.size(ButtonDefaults.SmallButtonSize),
onClick = {
Expand Down Expand Up @@ -249,6 +211,23 @@ fun WearApp() {
)
},
) { Text("2") }
Button(
modifier = Modifier.size(ButtonDefaults.SmallButtonSize),
onClick = {
sendPostRequest(
Execution(
command = "action.devices.commands.volumeRelative",
params = mapOf("relativeSteps" to -1),
), context
)
},
) {
Icon(
imageVector = Icons.Rounded.VolumeDown,
contentDescription = "turn volume down",
modifier = iconModifier
)
}
}
}
item {
Expand All @@ -275,6 +254,23 @@ fun WearApp() {
)
},
) { Text("4") }
Button(
modifier = Modifier.size(ButtonDefaults.SmallButtonSize),
onClick = {
sendPostRequest(
Execution(
command = "action.devices.commands.mute",
params = mapOf("mute" to true),
), context
)
},
) {
Icon(
imageVector = Icons.Rounded.VolumeOff,
contentDescription = "mute volume",
modifier = iconModifier
)
}
}
}
item {
Expand Down

0 comments on commit cfa3b9c

Please sign in to comment.