From d589df860e548548981a07e9fb390d1694f920d5 Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Tue, 15 Oct 2024 12:10:29 +0800 Subject: [PATCH] Refactor(ToolView): Remove safeDrawingPadding --- .../top/fatweb/oxygen/toolbox/ui/OxygenApp.kt | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/app/src/main/kotlin/top/fatweb/oxygen/toolbox/ui/OxygenApp.kt b/app/src/main/kotlin/top/fatweb/oxygen/toolbox/ui/OxygenApp.kt index bf52636..d2c9049 100644 --- a/app/src/main/kotlin/top/fatweb/oxygen/toolbox/ui/OxygenApp.kt +++ b/app/src/main/kotlin/top/fatweb/oxygen/toolbox/ui/OxygenApp.kt @@ -5,14 +5,10 @@ import androidx.compose.animation.AnimatedVisibility import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.WindowInsets -import androidx.compose.foundation.layout.WindowInsetsSides import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.only import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.safeDrawing import androidx.compose.foundation.layout.safeDrawingPadding -import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -181,19 +177,15 @@ fun OxygenApp(appState: OxygenAppState) { Row( Modifier .fillMaxSize() - .padding(padding) - .consumeWindowInsets(padding) - .windowInsetsPadding( - WindowInsets.safeDrawing.only( - WindowInsetsSides.Horizontal - ) - ) ) { AnimatedVisibility( visible = appState.shouldShowNavRail && destination != null ) { OxygenNavRail( - modifier = Modifier.safeDrawingPadding(), + modifier = Modifier + .padding(padding) + .consumeWindowInsets(padding) + .safeDrawingPadding(), destinations = appState.topLevelDestinations, currentDestination = appState.currentDestination, onNavigateToDestination = appState::navigateToTopLevelDestination