Refactor(ToolView): Remove safeDrawingPadding
This commit is contained in:
@@ -5,14 +5,10 @@ import androidx.compose.animation.AnimatedVisibility
|
|||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.WindowInsets
|
import androidx.compose.foundation.layout.WindowInsets
|
||||||
import androidx.compose.foundation.layout.WindowInsetsSides
|
|
||||||
import androidx.compose.foundation.layout.consumeWindowInsets
|
import androidx.compose.foundation.layout.consumeWindowInsets
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.only
|
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.safeDrawing
|
|
||||||
import androidx.compose.foundation.layout.safeDrawingPadding
|
import androidx.compose.foundation.layout.safeDrawingPadding
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
@@ -181,19 +177,15 @@ fun OxygenApp(appState: OxygenAppState) {
|
|||||||
Row(
|
Row(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(padding)
|
|
||||||
.consumeWindowInsets(padding)
|
|
||||||
.windowInsetsPadding(
|
|
||||||
WindowInsets.safeDrawing.only(
|
|
||||||
WindowInsetsSides.Horizontal
|
|
||||||
)
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
AnimatedVisibility(
|
AnimatedVisibility(
|
||||||
visible = appState.shouldShowNavRail && destination != null
|
visible = appState.shouldShowNavRail && destination != null
|
||||||
) {
|
) {
|
||||||
OxygenNavRail(
|
OxygenNavRail(
|
||||||
modifier = Modifier.safeDrawingPadding(),
|
modifier = Modifier
|
||||||
|
.padding(padding)
|
||||||
|
.consumeWindowInsets(padding)
|
||||||
|
.safeDrawingPadding(),
|
||||||
destinations = appState.topLevelDestinations,
|
destinations = appState.topLevelDestinations,
|
||||||
currentDestination = appState.currentDestination,
|
currentDestination = appState.currentDestination,
|
||||||
onNavigateToDestination = appState::navigateToTopLevelDestination
|
onNavigateToDestination = appState::navigateToTopLevelDestination
|
||||||
|
|||||||
Reference in New Issue
Block a user