Fixed rebase interactive layout
This commit is contained in:
parent
5d7d1d6f8b
commit
d934b83c4e
@ -7,6 +7,7 @@ import androidx.compose.material.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.jetpackduba.gitnuro.theme.textButtonColors
|
||||
@ -83,21 +84,18 @@ fun RebaseStateLoaded(
|
||||
}
|
||||
}
|
||||
|
||||
Row(modifier = Modifier.padding(bottom = 16.dp)) {
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
TextButton(
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
onClick = {
|
||||
onCancel()
|
||||
},
|
||||
colors = textButtonColors(),
|
||||
Row(
|
||||
modifier = Modifier.padding(bottom = 16.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Text(
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
PrimaryButton(
|
||||
text = "Cancel",
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
style = MaterialTheme.typography.body1,
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
onClick = onCancel,
|
||||
backgroundColor = Color.Transparent,
|
||||
textColor = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
PrimaryButton(
|
||||
modifier = Modifier.padding(end = 16.dp),
|
||||
enabled = stepsList.any { it.action != Action.PICK },
|
||||
@ -130,6 +128,7 @@ fun RebaseCommit(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 16.dp, vertical = 8.dp)
|
||||
.height(IntrinsicSize.Min)
|
||||
.fillMaxWidth()
|
||||
) {
|
||||
ActionDropdown(
|
||||
rebaseLine.action,
|
||||
|
@ -55,13 +55,15 @@ fun AdjustableOutlinedTextField(
|
||||
val indicatorColor by colors.indicatorColor(enabled, isError, interactionSource)
|
||||
|
||||
Box(
|
||||
modifier = Modifier
|
||||
modifier = modifier
|
||||
.height(IntrinsicSize.Min)
|
||||
.background(Color.Red)
|
||||
) {
|
||||
BasicTextField(
|
||||
modifier = modifier
|
||||
modifier = Modifier
|
||||
.heightIn(min = 40.dp)
|
||||
.background(backgroundColor),
|
||||
.background(backgroundColor)
|
||||
.fillMaxWidth(),
|
||||
value = value,
|
||||
onValueChange = onValueChange,
|
||||
enabled = enabled,
|
||||
|
@ -7,6 +7,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
@ -37,8 +38,9 @@ fun PrimaryButton(
|
||||
onClick()
|
||||
}
|
||||
} else
|
||||
handOnHover()
|
||||
this
|
||||
},
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Text(
|
||||
text,
|
||||
|
@ -106,6 +106,7 @@ fun AuthorDialog(
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
onClick = onClose,
|
||||
backgroundColor = Color.Transparent,
|
||||
textColor = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
PrimaryButton(
|
||||
onClick = {
|
||||
|
@ -207,7 +207,8 @@ private fun CloneInput(
|
||||
next = urlFocusRequester
|
||||
},
|
||||
onClick = onClose,
|
||||
backgroundColor = Color.Transparent
|
||||
backgroundColor = Color.Transparent,
|
||||
textColor = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
PrimaryButton(
|
||||
onClick = {
|
||||
|
@ -91,7 +91,8 @@ fun NewBranchDialog(
|
||||
text = "Cancel",
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
onClick = onClose,
|
||||
backgroundColor = Color.Transparent
|
||||
backgroundColor = Color.Transparent,
|
||||
textColor = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
PrimaryButton(
|
||||
modifier = Modifier
|
||||
|
@ -91,7 +91,8 @@ fun NewTagDialog(
|
||||
text = "Cancel",
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
onClick = onReject,
|
||||
backgroundColor = Color.Transparent
|
||||
backgroundColor = Color.Transparent,
|
||||
textColor = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
PrimaryButton(
|
||||
modifier = Modifier
|
||||
|
@ -97,7 +97,8 @@ fun PasswordDialog(
|
||||
text = "Cancel",
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
onClick = onReject,
|
||||
backgroundColor = Color.Transparent
|
||||
backgroundColor = Color.Transparent,
|
||||
textColor = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
PrimaryButton(
|
||||
modifier = Modifier
|
||||
|
@ -96,7 +96,8 @@ fun ResetBranchDialog(
|
||||
text = "Cancel",
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
onClick = onReject,
|
||||
backgroundColor = Color.Transparent
|
||||
backgroundColor = Color.Transparent,
|
||||
textColor = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
PrimaryButton(
|
||||
onClick = {
|
||||
|
@ -91,7 +91,8 @@ fun StashWithMessageDialog(
|
||||
text = "Cancel",
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
onClick = onClose,
|
||||
backgroundColor = Color.Transparent
|
||||
backgroundColor = Color.Transparent,
|
||||
textColor = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
PrimaryButton(
|
||||
modifier = Modifier
|
||||
|
@ -122,7 +122,8 @@ fun UserPasswordDialog(
|
||||
text = "Cancel",
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
onClick = onReject,
|
||||
backgroundColor = Color.Transparent
|
||||
backgroundColor = Color.Transparent,
|
||||
textColor = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
PrimaryButton(
|
||||
modifier = Modifier
|
||||
|
Loading…
Reference in New Issue
Block a user