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