mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-09 03:54:23 +08:00
refactor: use VerticalContentSpacingRatio in vertical contentSpacing
This commit is contained in:
@@ -268,7 +268,7 @@ private class ActionBarImpl(
|
|||||||
private fun CenterContent() {
|
private fun CenterContent() {
|
||||||
Column(
|
Column(
|
||||||
horizontalAlignment = Alignment.Start,
|
horizontalAlignment = Alignment.Start,
|
||||||
verticalArrangement = Arrangement.spacedBy(style.contentSpacing / 2)
|
verticalArrangement = Arrangement.spacedBy(style.contentSpacing / VerticalContentSpacingRatio)
|
||||||
) {
|
) {
|
||||||
ContentStyle(
|
ContentStyle(
|
||||||
color = colors.titleTextColor,
|
color = colors.titleTextColor,
|
||||||
@@ -361,3 +361,5 @@ private fun defaultActionBarStyle() = ActionBarStyle(
|
|||||||
)
|
)
|
||||||
|
|
||||||
private val DefaultActionContentMaxWidth = 170.dp
|
private val DefaultActionContentMaxWidth = 170.dp
|
||||||
|
|
||||||
|
private const val VerticalContentSpacingRatio = 1.6f
|
@@ -181,7 +181,7 @@ fun NavigationItem(
|
|||||||
) {
|
) {
|
||||||
icon()
|
icon()
|
||||||
text?.also { content ->
|
text?.also { content ->
|
||||||
Box(modifier = Modifier.height(currentContentSpacing / 2))
|
Box(modifier = Modifier.height(currentContentSpacing / VerticalContentSpacingRatio))
|
||||||
content()
|
content()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -254,3 +254,5 @@ private fun defaultNavigationStyle() = NavigationStyle(
|
|||||||
),
|
),
|
||||||
contentShape = withAreaBoxShape()
|
contentShape = withAreaBoxShape()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private const val VerticalContentSpacingRatio = 1.6f
|
Reference in New Issue
Block a user