Truncation Logic Refinement
Nucleic-Session: FE1E2C94-7945-4827-AF56-74525A9BD434 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -95,6 +95,17 @@ struct AskUserQuestionCardView: View {
|
||||
}
|
||||
.padding()
|
||||
.glassSurface(cornerRadius: 20)
|
||||
// A hard ceiling on the whole card so it can never exceed the screen; `nil` (before the
|
||||
// height is measured) leaves it unconstrained.
|
||||
.frame(maxHeight: availableHeight > 0 ? availableHeight - 12 : nil, alignment: .bottom)
|
||||
}
|
||||
|
||||
/// The height the scrolling question region may take before it starts scrolling — the screen
|
||||
/// minus a reserve for the header and the button row, so those always have room. Falls back to
|
||||
/// a roomy default before the height is measured.
|
||||
private var middleMaxHeight: CGFloat {
|
||||
let base = availableHeight > 0 ? availableHeight - 12 : 640
|
||||
return max(160, base - 170)
|
||||
}
|
||||
|
||||
// MARK: - Wizard state
|
||||
|
||||
Reference in New Issue
Block a user