fix macOS layout

This commit is contained in:
Toni Förster 2023-11-24 14:09:40 +01:00
parent 5d78946320
commit cbdf295d67
No known key found for this signature in database
GPG Key ID: 292F3E5086C83FC7

View File

@ -197,14 +197,17 @@ struct PlayerSettings: View {
}
private var collapsedLineDescriptionStepper: some View {
Stepper(value: $collapsedLinesDescription, in: 0 ... 10) {
Text("Description preview")
if collapsedLinesDescription == 0 {
Text("No preview")
} else if collapsedLinesDescription == 1 {
Text("\(collapsedLinesDescription) line")
} else {
Text("\(collapsedLinesDescription) lines")
LazyVStack {
Stepper(value: $collapsedLinesDescription, in: 0 ... 10) {
Text("Description preview")
#if os(macOS)
Spacer()
#endif
if collapsedLinesDescription == 0 {
Text("No preview")
} else {
Text("\(collapsedLinesDescription) lines")
}
}
}
}