iOS - the description header is a button now

This commit is contained in:
Toni Förster 2023-11-25 21:58:42 +01:00
parent ed5fa8e4aa
commit 6994271eca
No known key found for this signature in database
GPG Key ID: 292F3E5086C83FC7

View File

@ -410,18 +410,34 @@ struct VideoDetails: View {
}
var descriptionHeader: some View {
HStack {
Text("Description".localized())
Spacer()
Button { descriptionExpanded.toggle()
} label: {
Image(systemName: descriptionExpanded ? "chevron.up" : "chevron.down")
.imageScale(.small)
#if canImport(UIKit)
Button(action: {
descriptionExpanded.toggle()
}) {
HStack {
Text("Description".localized())
Spacer()
Image(systemName: descriptionExpanded ? "chevron.up" : "chevron.down")
.imageScale(.small)
}
.padding(.horizontal)
.font(.caption)
.foregroundColor(.secondary)
}
}
.padding(.horizontal)
.font(.caption)
.foregroundColor(.secondary)
#elseif canImport(AppKit)
HStack {
Text("Description".localized())
Spacer()
Button { descriptionExpanded.toggle()
} label: {
Image(systemName: descriptionExpanded ? "chevron.up" : "chevron.down")
.imageScale(.small)
}
}
.padding(.horizontal)
.font(.caption)
.foregroundColor(.secondary)
#endif
}
var chaptersHeader: some View {