File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import androidx.compose.foundation.gestures.detectTapGestures
99import androidx.compose.foundation.layout.Arrangement
1010import androidx.compose.foundation.layout.Column
1111import androidx.compose.foundation.layout.Row
12+ import androidx.compose.foundation.layout.Spacer
1213import androidx.compose.foundation.layout.WindowInsets
1314import androidx.compose.foundation.layout.WindowInsetsSides
1415import androidx.compose.foundation.layout.asPaddingValues
@@ -106,16 +107,8 @@ fun NavigationBar(
106107 )
107108 val fontWeight = if (isSelected) FontWeight .Medium else FontWeight .Normal
108109 Column (
109- modifier = if (defaultWindowInsetsPadding) {
110- modifier
111- .height(
112- NavigationBarHeight
113- + WindowInsets .navigationBars.asPaddingValues().calculateBottomPadding()
114- + animatedCaptionBarHeight
115- )
116- } else {
117- modifier.height(NavigationBarHeight )
118- }
110+ modifier = modifier
111+ .height(NavigationBarHeight )
119112 .weight(1f / items.size)
120113 .pointerInput(Unit ) {
121114 detectTapGestures(
@@ -146,6 +139,14 @@ fun NavigationBar(
146139 }
147140 }
148141 }
142+ if (defaultWindowInsetsPadding) {
143+ Spacer (
144+ modifier = Modifier
145+ .fillMaxWidth()
146+ .height(WindowInsets .navigationBars.asPaddingValues().calculateBottomPadding() + animatedCaptionBarHeight)
147+ .pointerInput(Unit ) { detectTapGestures { /* Do nothing to consume the click */ } }
148+ )
149+ }
149150 }
150151 }
151152}
You can’t perform that action at this time.
0 commit comments