Changed abort button colors

This commit is contained in:
Abdelilah El Aissaoui 2022-02-18 12:30:30 +01:00
parent 902626f04b
commit 7a86ed8227

View File

@ -288,17 +288,12 @@ fun MergeButtons(
Row( Row(
modifier = Modifier.fillMaxWidth() modifier = Modifier.fillMaxWidth()
) { ) {
Button( AbortButton(
onClick = onAbort,
modifier = Modifier modifier = Modifier
.weight(1f) .weight(1f)
.padding(start = 8.dp, end = 4.dp), .padding(start = 8.dp, end = 4.dp),
) { onClick = onAbort
Text( )
text = "Abort",
fontSize = 14.sp,
)
}
Button( Button(
onClick = onMerge, onClick = onMerge,
@ -327,17 +322,12 @@ fun RebasingButtons(
Row( Row(
modifier = Modifier.fillMaxWidth() modifier = Modifier.fillMaxWidth()
) { ) {
Button( AbortButton(
onClick = onAbort,
modifier = Modifier modifier = Modifier
.weight(1f) .weight(1f)
.padding(start = 8.dp, end = 4.dp), .padding(start = 8.dp, end = 4.dp),
) { onClick = onAbort
Text( )
text = "Abort",
fontSize = 14.sp,
)
}
if (canContinue) { if (canContinue) {
Button( Button(
@ -369,6 +359,23 @@ fun RebasingButtons(
} }
} }
@Composable
fun AbortButton(modifier: Modifier, onClick: () -> Unit) {
Button(
onClick = onClick,
modifier = modifier,
colors = ButtonDefaults.buttonColors(
backgroundColor = MaterialTheme.colors.unstageButton,
contentColor = Color.White
)
) {
Text(
text = "Abort",
fontSize = 14.sp,
)
}
}
// TODO: This logic should be part of the diffViewModel where it gets the latest version of the diffEntry // TODO: This logic should be part of the diffViewModel where it gets the latest version of the diffEntry
fun checkIfSelectedEntryShouldBeUpdated( fun checkIfSelectedEntryShouldBeUpdated(
selectedEntryType: DiffEntryType, selectedEntryType: DiffEntryType,