@@ -18,6 +18,7 @@ import com.mrboomdev.awery.ui.Navigation
1818import com.mrboomdev.awery.ui.effects.BackEffect
1919import com.mrboomdev.awery.ui.screens.settings.pages.SettingsPages
2020import com.mrboomdev.awery.ui.utils.WindowSizeType
21+ import com.mrboomdev.awery.ui.utils.asWindowInsets
2122import com.mrboomdev.awery.ui.utils.currentWindowSize
2223import com.mrboomdev.navigation.core.safePop
2324import com.mrboomdev.navigation.core.sealedNavigationGraph
@@ -52,18 +53,14 @@ fun SettingsScreen(
5253 }
5354 }
5455
55- Row (
56- modifier = Modifier
57- .fillMaxSize()
58- .padding(contentPadding)
59- ) {
56+ Row (Modifier .fillMaxSize()) {
6057 primaryPane.Content (
6158 modifier = Modifier
6259 .fillMaxHeight()
6360 .widthIn(max = 300 .dp)
6461 .fillMaxWidth(),
6562
66- windowInsets = WindowInsets .safeDrawing .only(
63+ windowInsets = contentPadding.asWindowInsets() .only(
6764 WindowInsetsSides .Vertical + WindowInsetsSides .Start
6865 ),
6966
@@ -101,7 +98,7 @@ fun SettingsScreen(
10198 if (page is SettingsPages .Main ) {
10299 return @sealedNavigationGraph SettingsPages .Appearance .Content (
103100 modifier = Modifier .fillMaxSize(),
104- windowInsets = WindowInsets .safeDrawing ,
101+ windowInsets = contentPadding.asWindowInsets() ,
105102 onOpenPage = { settingsNavigation.push(it) },
106103 onBack = null
107104 )
@@ -110,7 +107,7 @@ fun SettingsScreen(
110107 page.Content (
111108 modifier = Modifier .fillMaxSize(),
112109
113- windowInsets = WindowInsets .safeDrawing .only(
110+ windowInsets = contentPadding.asWindowInsets() .only(
114111 WindowInsetsSides .Vertical + WindowInsetsSides .End
115112 ).add(WindowInsets (left = 16 .dp)),
116113
@@ -126,9 +123,7 @@ fun SettingsScreen(
126123 }
127124 } else {
128125 JetpackNavigationHost (
129- modifier = Modifier
130- .fillMaxSize()
131- .padding(contentPadding),
126+ modifier = Modifier .fillMaxSize(),
132127 navigation = settingsNavigation,
133128 enterTransition = { slideInHorizontally(tween(500 )) { it } },
134129 exitTransition = { slideOutHorizontally(tween(500 )) { - it } },
@@ -140,7 +135,7 @@ fun SettingsScreen(
140135
141136 page.Content (
142137 modifier = Modifier .fillMaxSize(),
143- windowInsets = WindowInsets .safeDrawing ,
138+ windowInsets = contentPadding.asWindowInsets() ,
144139 onOpenPage = { settingsNavigation.push(it) },
145140 onBack = {
146141 if (settingsBackStack.size <= 1 ) {
0 commit comments