Skip to content

Commit

Permalink
fix: window insets
Browse files Browse the repository at this point in the history
  • Loading branch information
psuzn committed Jan 23, 2024
1 parent b783d8b commit 0832f99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
{
Expand Down

0 comments on commit 0832f99

Please sign in to comment.