0c23ea982690
fix: settings deck fills to gutter on tall screens (v2.9.24)
- time
- 2026-08-01 21:30 UTC · 2 months ago
- machine
- koh2
- parent
- 938a4d13600f
↓ peach-android-0c23ea98.tar.gzatlas at this save
files changed2 files
VERSION+1 −1app/src/main/java/com/peachpasswords/ui/settings/SettingsScreen.kt+9 −8app/src/main/java/com/peachpasswords/ui/settings/SettingsScreen.kt+9 −8
@@ -92,7 +92,6 @@9292 private val TAB_H = 46.dp9393 private val TAB_OVERLAP = 14.dp9494 private val TAB_CARD_H = TAB_H + 4.dp95-private val MAX_DECK_H = 462.dp9695 private val DECK_BOTTOM_GUTTER = 36.dp9796 9897 /** Drag distance past which a stack card flips between focused and deck states. */@@ -130,16 +129,18 @@130129 expandedH - TAB_OVERLAP + COLLAPSED_TAB_STRIDE * distance131130 132131 /**133- * The deck fills the available screen height (minus a bottom gutter) rather134- * than capping at [MAX_DECK_H] — that constant was ported verbatim from the135- * browser's small popup (`StackDeck.tsx`) and, left as a hard cap, stranded136- * a third of the screen as dead space below the stack on a phone-height137- * viewport. [MAX_DECK_H] still bounds the deck on very tall/tablet screens138- * so a focused card doesn't grow absurdly large.132+ * The deck fills the available screen height minus a bottom gutter on every133+ * screen size; the gutter reserves room for the build label pinned to the134+ * bottom corner. An earlier version capped this at a multiple of a constant135+ * ported from the browser's small popup (`StackDeck.tsx`), but on tall panels136+ * like the Galaxy Z Fold 7 the available height exceeded that cap — stranding137+ * a band of dead space below the stack and clipping the Pro card's copy/reveal138+ * buttons. Filling to the gutter is how phones already behave, so this just139+ * makes tall screens consistent with them.139140 */140141 internal fun settingsDeckHeight(availableHeight: Dp): Dp {141142 val constrained = availableHeight - DECK_BOTTOM_GUTTER142- return minOf(MAX_DECK_H * 2, if (constrained < 0.dp) 0.dp else constrained)143+ return if (constrained < 0.dp) 0.dp else constrained143144 }144145 145146 @Composable