fix(ui): Draw all screens edge-to-edge under system bars

Scrolling content now slides under the transparent status and
navigation bars instead of clipping at the inset boundary. Adds
PaddingValues.plus and systemBarsAndCutoutInsets helpers, moves inset
consumption from scroll viewports into content padding on every screen,
fixes reorder auto-scroll thresholds for content padding, adds IME
handling to form screens, and removes the unused EdgeToEdgeHelper.
This commit is contained in:
darken
2026-07-24 17:53:13 +02:00
committed by Matthias Urhahn
parent 37278af34e
commit 73dc10aee9
21 changed files with 179 additions and 113 deletions
@@ -0,0 +1,33 @@
package eu.darken.capod.common.compose
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
import io.kotest.matchers.shouldBe
import org.junit.jupiter.api.Test
import testhelpers.BaseTest
class InsetsExtensionsTest : BaseTest() {
@Test
fun `plus - sums start-end padding under Ltr`() {
val a = PaddingValues(start = 4.dp, top = 8.dp, end = 12.dp, bottom = 16.dp)
val b = PaddingValues(start = 1.dp, top = 2.dp, end = 3.dp, bottom = 4.dp)
val sum = a + b
sum.calculateLeftPadding(LayoutDirection.Ltr) shouldBe 5.dp
sum.calculateRightPadding(LayoutDirection.Ltr) shouldBe 15.dp
sum.calculateTopPadding() shouldBe 10.dp
sum.calculateBottomPadding() shouldBe 20.dp
}
@Test
fun `plus - sums start-end padding under Rtl`() {
val a = PaddingValues(start = 4.dp, top = 8.dp, end = 12.dp, bottom = 16.dp)
val b = PaddingValues(start = 1.dp, top = 2.dp, end = 3.dp, bottom = 4.dp)
val sum = a + b
sum.calculateLeftPadding(LayoutDirection.Rtl) shouldBe 15.dp
sum.calculateRightPadding(LayoutDirection.Rtl) shouldBe 5.dp
sum.calculateTopPadding() shouldBe 10.dp
sum.calculateBottomPadding() shouldBe 20.dp
}
}