Skip to content

Commit c11894a

Browse files
committed
ios: Optimize nav bar height
1 parent 6368fd5 commit c11894a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic/NavigationBar.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ import androidx.compose.ui.unit.Dp
3838
import androidx.compose.ui.unit.dp
3939
import androidx.compose.ui.unit.sp
4040
import top.yukonga.miuix.kmp.theme.MiuixTheme
41+
import top.yukonga.miuix.kmp.utils.Platform
42+
import top.yukonga.miuix.kmp.utils.platform
4143

4244
/**
4345
* A navigation bar that with 2 to 5 items.
@@ -127,7 +129,7 @@ fun NavigationBar(
127129
colorFilter = ColorFilter.tint(tint)
128130
)
129131
Text(
130-
modifier = Modifier.padding(bottom = 12.dp),
132+
modifier = Modifier.padding(bottom = if (platform() != Platform.IOS) 12.dp else 0.dp),
131133
text = item.label,
132134
color = tint,
133135
textAlign = TextAlign.Center,
@@ -142,7 +144,7 @@ fun NavigationBar(
142144
}
143145

144146
/** The default expanded height of a [NavigationBar]. */
145-
val NavigationBarHeight: Dp = 64.dp
147+
val NavigationBarHeight: Dp = if (platform() != Platform.IOS) 64.dp else 48.dp
146148

147149

148150
/**

0 commit comments

Comments
 (0)