Fixed menu padding missalignments
This commit is contained in:
parent
a34c6f194d
commit
6901bf9f1c
@ -53,6 +53,7 @@ fun Menu(
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
|
||||
ExtendedMenuButton(
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
title = "Pull",
|
||||
icon = painterResource("download.svg"),
|
||||
onClick = { menuViewModel.pull() },
|
||||
@ -80,7 +81,7 @@ fun Menu(
|
||||
)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.width(16.dp))
|
||||
Spacer(modifier = Modifier.width(24.dp))
|
||||
|
||||
MenuButton(
|
||||
title = "Branch",
|
||||
@ -90,9 +91,10 @@ fun Menu(
|
||||
},
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.width(16.dp))
|
||||
Spacer(modifier = Modifier.width(24.dp))
|
||||
|
||||
MenuButton(
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
title = "Stash",
|
||||
icon = painterResource("stash.svg"),
|
||||
onClick = { menuViewModel.stash() },
|
||||
@ -153,9 +155,8 @@ fun MenuButton(
|
||||
|
||||
Box(
|
||||
modifier = modifier
|
||||
.padding(horizontal = 2.dp)
|
||||
.handMouseClickable { if (enabled) onClick() }
|
||||
.border(ButtonDefaults.outlinedBorder, RoundedCornerShape(3.dp))
|
||||
.border(ButtonDefaults.outlinedBorder, RoundedCornerShape(4.dp))
|
||||
.padding(vertical = 8.dp, horizontal = 16.dp),
|
||||
) {
|
||||
Row(
|
||||
@ -196,14 +197,12 @@ fun ExtendedMenuButton(
|
||||
|
||||
var showDropDownMenu by remember { mutableStateOf(false) }
|
||||
|
||||
Row(modifier = Modifier.height(IntrinsicSize.Min)) {
|
||||
Box(
|
||||
modifier = modifier
|
||||
.handMouseClickable { if (enabled) onClick() }
|
||||
.border(ButtonDefaults.outlinedBorder, RoundedCornerShape(topStart = 3.dp, bottomStart = 3.dp))
|
||||
.padding(vertical = 8.dp, horizontal = 16.dp),
|
||||
) {
|
||||
Row(modifier = modifier.height(IntrinsicSize.Min)) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.handMouseClickable { if (enabled) onClick() }
|
||||
.border(ButtonDefaults.outlinedBorder, RoundedCornerShape(topStart = 4.dp, bottomStart = 4.dp))
|
||||
.padding(vertical = 8.dp, horizontal = 16.dp),
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
@ -221,14 +220,12 @@ fun ExtendedMenuButton(
|
||||
color = MaterialTheme.colors.primaryTextColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Box(
|
||||
modifier = modifier
|
||||
.padding(end = 8.dp)
|
||||
modifier = Modifier
|
||||
.width(20.dp)
|
||||
.fillMaxHeight()
|
||||
.border(ButtonDefaults.outlinedBorder, RoundedCornerShape(topEnd = 3.dp, bottomEnd = 3.dp))
|
||||
.border(ButtonDefaults.outlinedBorder, RoundedCornerShape(topEnd = 4.dp, bottomEnd = 4.dp))
|
||||
.handMouseClickable {
|
||||
showDropDownMenu = true
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user