mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Add setting for thumbnails quality
This commit is contained in:
@@ -9,6 +9,7 @@ struct BrowsingSettings: View {
|
||||
#if os(iOS)
|
||||
@Default(.lockPortraitWhenBrowsing) private var lockPortraitWhenBrowsing
|
||||
#endif
|
||||
@Default(.thumbnailsQuality) private var thumbnailsQuality
|
||||
@Default(.channelOnThumbnail) private var channelOnThumbnail
|
||||
@Default(.timeOnThumbnail) private var timeOnThumbnail
|
||||
@Default(.visibleSections) private var visibleSections
|
||||
@@ -65,6 +66,7 @@ struct BrowsingSettings: View {
|
||||
|
||||
private var thumbnailsSettings: some View {
|
||||
Section(header: SettingsHeader(text: "Thumbnails")) {
|
||||
thumbnailsQualityPicker
|
||||
#if !os(tvOS)
|
||||
Toggle("Round corners", isOn: $roundedThumbnails)
|
||||
#endif
|
||||
@@ -73,6 +75,21 @@ struct BrowsingSettings: View {
|
||||
}
|
||||
}
|
||||
|
||||
private var thumbnailsQualityPicker: some View {
|
||||
Picker("Quality", selection: $thumbnailsQuality) {
|
||||
ForEach(ThumbnailsQuality.allCases, id: \.self) { quality in
|
||||
Text(quality.rawValue.capitalized + " quality").tag(quality)
|
||||
}
|
||||
}
|
||||
.labelsHidden()
|
||||
|
||||
#if os(iOS)
|
||||
.pickerStyle(.automatic)
|
||||
#elseif os(tvOS)
|
||||
.pickerStyle(.inline)
|
||||
#endif
|
||||
}
|
||||
|
||||
private var visibleSectionsSettings: some View {
|
||||
Section(header: SettingsHeader(text: "Sections")) {
|
||||
#if os(macOS)
|
||||
|
Reference in New Issue
Block a user