ClickableIcon: Remove unwanted left margin
This commit is contained in:
@@ -29,7 +29,6 @@ fun ClickableIcon(
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = modifier
|
||||
.padding(start = 8.dp)
|
||||
.size(height = 40.dp, width = 40.dp)
|
||||
.clip(CircleShape)
|
||||
.addIf(onClick != null) {
|
||||
|
||||
@@ -187,7 +187,7 @@ fun TopBar(
|
||||
) {
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.height(56.dp)
|
||||
modifier = Modifier.height(56.dp).padding(horizontal = 8.dp)
|
||||
) {
|
||||
AnimatedVisibility(visible = showBackArrow) {
|
||||
ClickableIcon(
|
||||
@@ -199,9 +199,7 @@ fun TopBar(
|
||||
Text(
|
||||
text = label,
|
||||
style = MaterialTheme.typography.h6,
|
||||
modifier = Modifier.padding(
|
||||
start = animateDpAsState(targetValue = if (showBackArrow) 8.dp else 16.dp).value
|
||||
)
|
||||
modifier = Modifier.padding(start = 8.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ fun TopBar(
|
||||
label: String
|
||||
) {
|
||||
val navController = LocalNavController.current
|
||||
val labelPaddingStart = if (backArrowVisible) 8.dp else 16.dp
|
||||
val navBackStackEntry by navController.currentBackStackEntryAsState()
|
||||
val currentRoute = navBackStackEntry?.destination?.route
|
||||
|
||||
@@ -66,6 +65,7 @@ fun TopBar(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(topBarSize)
|
||||
.padding(horizontal = 8.dp)
|
||||
) {
|
||||
if (backArrowVisible) {
|
||||
ClickableIcon(
|
||||
@@ -77,7 +77,7 @@ fun TopBar(
|
||||
Text(
|
||||
text = label,
|
||||
style = MaterialTheme.typography.h6,
|
||||
modifier = Modifier.padding(start = labelPaddingStart, end = 24.dp),
|
||||
modifier = Modifier.padding(start = 8.dp),
|
||||
color = MaterialTheme.colors.onSurface,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
|
||||
Reference in New Issue
Block a user