d8c36c86dde0
wide-screen/foldable audit (task 27): found LockScreen and OnboardingScreen's centered glass-panel content stretching edge-to-edge on tablet/foldable widths instead of staying a comfortable card width, confirmed live at an override 1200x1600 wm size — the root Column used only fillMaxSize with no width cap. Fixed both by capping the content Column at widthIn(max = 480.dp), centered in the remaining space via Box alignment; modifier order matters here (widthIn must precede fillMaxWidth in the chain, since fillMaxWidth first would lock min=max to the full available width before the cap could apply). Live-verified at the wide override across all 3 onboarding cards plus the create-vault/lock screen: content now caps and centers correctly instead of stretching full-bleed. Scope note: this fixes the two worst-offending 'hero card' screens: the many other top-bar+scrollable-form screens (Settings, Import, Export, EntryDetail, etc.) share the same unconstrained-fillMaxSize root pattern and would need the same treatment for full tablet/foldable readiness, but that's a much larger sweep across ~15+ files left for a dedicated follow-up rather than folded into this pass.
- time
- 2026-07-24 18:10 UTC · 3 months ago
- machine
- koh2
- agent
- claude-sonnet-5
- session
- wide-screen/foldable audit: cap hero-card content width
- parent
- 6708bbf7f7ac
↓ peach-android-d8c36c86.tar.gzatlas at this save
files changed2 files
app/src/main/java/com/peachpasswords/ui/lock/LockScreen.kt+10 −1app/src/main/java/com/peachpasswords/ui/onboarding/OnboardingScreen.kt+9 −1app/src/main/java/com/peachpasswords/ui/lock/LockScreen.kt+10 −1
@@ -12,12 +12,14 @@1212 import androidx.compose.foundation.layout.Column1313 import androidx.compose.foundation.layout.Row1414 import androidx.compose.foundation.layout.Spacer15+import androidx.compose.foundation.layout.fillMaxHeight1516 import androidx.compose.foundation.layout.fillMaxSize1617 import androidx.compose.foundation.layout.offset1718 import androidx.compose.foundation.layout.fillMaxWidth1819 import androidx.compose.foundation.layout.height1920 import androidx.compose.foundation.layout.padding2021 import androidx.compose.foundation.layout.systemBarsPadding22+import androidx.compose.foundation.layout.widthIn2123 import androidx.compose.foundation.shape.RoundedCornerShape2224 import androidx.compose.foundation.text.BasicTextField2325 import androidx.compose.foundation.text.KeyboardActions@@ -126,7 +128,14 @@126128 127129 Column(128130 modifier = Modifier129- .fillMaxSize()131+ // Gate 1 (wide-screen/foldable audit): this card-style content132+ // was stretching edge-to-edge on tablet/foldable widths instead133+ // of staying a comfortable card width — cap it and center it in134+ // the remaining space, same as a phone gets automatically.135+ .align(Alignment.Center)136+ .fillMaxHeight()137+ .widthIn(max = 480.dp)138+ .fillMaxWidth()130139 .systemBarsPadding()131140 .padding(horizontal = 28.dp),132141 verticalArrangement = Arrangement.Center,app/src/main/java/com/peachpasswords/ui/onboarding/OnboardingScreen.kt+9 −1
@@ -11,6 +11,7 @@1111 import androidx.compose.foundation.layout.Column1212 import androidx.compose.foundation.layout.Row1313 import androidx.compose.foundation.layout.Spacer14+import androidx.compose.foundation.layout.fillMaxHeight1415 import androidx.compose.foundation.layout.fillMaxSize1516 import androidx.compose.foundation.layout.fillMaxWidth1617 import androidx.compose.foundation.layout.height@@ -19,6 +20,7 @@1920 import androidx.compose.foundation.layout.size2021 import androidx.compose.foundation.layout.systemBarsPadding2122 import androidx.compose.foundation.layout.width23+import androidx.compose.foundation.layout.widthIn2224 import androidx.compose.foundation.shape.RoundedCornerShape2325 import androidx.compose.runtime.Composable2426 import androidx.compose.runtime.LaunchedEffect@@ -130,7 +132,13 @@130132 131133 Column(132134 modifier = Modifier133- .fillMaxSize()135+ // Gate 1 (wide-screen/foldable audit): matches LockScreen's fix136+ // — cap the card-style content instead of letting it stretch137+ // edge-to-edge on tablet/foldable widths.138+ .align(Alignment.Center)139+ .fillMaxHeight()140+ .widthIn(max = 480.dp)141+ .fillMaxWidth()134142 .systemBarsPadding()135143 .padding(horizontal = 28.dp),136144 verticalArrangement = Arrangement.Center,