From b57e78261391dde37b9a0e694cf80c21f5bf1e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 17 Oct 2023 08:04:21 +0200 Subject: [PATCH] Prevent drawing behind system bars in `WidgetConfigureScreen` --- .../flashlight/screens/BrightDisplayScreen.kt | 7 ++----- .../flashlight/screens/WidgetConfigureScreen.kt | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/screens/BrightDisplayScreen.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/screens/BrightDisplayScreen.kt index 826127f..4e6a467 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/screens/BrightDisplayScreen.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/screens/BrightDisplayScreen.kt @@ -2,10 +2,7 @@ package com.simplemobiletools.flashlight.screens import androidx.compose.foundation.background import androidx.compose.foundation.border -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.navigationBarsPadding -import androidx.compose.foundation.layout.wrapContentSize +import androidx.compose.foundation.layout.* import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable @@ -33,6 +30,7 @@ internal fun BrightDisplayScreen( modifier = Modifier .fillMaxSize() .background(Color(backgroundColor)) + .safeDrawingPadding() ) { TextButton( modifier = Modifier @@ -54,7 +52,6 @@ internal fun BrightDisplayScreen( Box( modifier = Modifier .align(Alignment.BottomEnd) - .navigationBarsPadding() ) { sleepTimer() } diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/screens/WidgetConfigureScreen.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/screens/WidgetConfigureScreen.kt index 69eff45..5d140c0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/screens/WidgetConfigureScreen.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/screens/WidgetConfigureScreen.kt @@ -37,7 +37,7 @@ internal fun WidgetConfigureScreen( onSavePressed: () -> Unit ) { Column( - modifier = Modifier.fillMaxSize(), + modifier = Modifier.fillMaxSize().safeDrawingPadding(), verticalArrangement = Arrangement.Bottom, ) { Box(