From 0832f99da922ede2b73f5f0c3aa2581a62b3b027 Mon Sep 17 00:00:00 2001 From: psuzn Date: Tue, 23 Jan 2024 13:35:06 +0545 Subject: [PATCH] fix: window insets --- .../me/sujanpoudel/playdeals/common/PlayDealApp.kt | 13 +------------ .../common/ui/components/common/ScaffoldToolbar.kt | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/shared/src/commonMain/kotlin/me/sujanpoudel/playdeals/common/PlayDealApp.kt b/shared/src/commonMain/kotlin/me/sujanpoudel/playdeals/common/PlayDealApp.kt index a076f94..4c3c0bb 100644 --- a/shared/src/commonMain/kotlin/me/sujanpoudel/playdeals/common/PlayDealApp.kt +++ b/shared/src/commonMain/kotlin/me/sujanpoudel/playdeals/common/PlayDealApp.kt @@ -2,12 +2,6 @@ package me.sujanpoudel.playdeals.common import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.WindowInsets -import androidx.compose.foundation.layout.navigationBars -import androidx.compose.foundation.layout.statusBars -import androidx.compose.foundation.layout.systemBars -import androidx.compose.foundation.layout.union -import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider @@ -97,12 +91,7 @@ fun PlayDealsApp() { AppTheme(preferences) { Box( modifier = Modifier - .background(MaterialTheme.colorScheme.background) - .windowInsetsPadding( - WindowInsets.navigationBars - .union(WindowInsets.statusBars) - .union(WindowInsets.systemBars), - ), + .background(MaterialTheme.colorScheme.background), ) { NavHost(navGraph) } diff --git a/shared/src/commonMain/kotlin/me/sujanpoudel/playdeals/common/ui/components/common/ScaffoldToolbar.kt b/shared/src/commonMain/kotlin/me/sujanpoudel/playdeals/common/ui/components/common/ScaffoldToolbar.kt index d435be3..5ed92e8 100644 --- a/shared/src/commonMain/kotlin/me/sujanpoudel/playdeals/common/ui/components/common/ScaffoldToolbar.kt +++ b/shared/src/commonMain/kotlin/me/sujanpoudel/playdeals/common/ui/components/common/ScaffoldToolbar.kt @@ -82,7 +82,7 @@ object ScaffoldToolbar { ) { val navigator = Navigator.current CenterAlignedTopAppBar( - modifier = modifier.windowInsetsPadding(WindowInsets(top = 10.dp)), + modifier = modifier.windowInsetsPadding(WindowInsets(top = 20.dp)), title = { ToolbarTitle(title) }, navigationIcon = {