mirror of
https://github.com/yattee/yattee.git
synced 2025-11-16 06:58:43 +00:00
Standardized picker and button sizing with consistent alignment and control sizes. Added SettingsPickerModifier to all macOS pickers with menu style. Improved rate buttons with proper sizing and alignment. Added text truncation for stream descriptions to prevent overflow.
32 lines
714 B
Swift
32 lines
714 B
Swift
import Foundation
|
|
import SwiftUI
|
|
|
|
struct SettingsPickerModifier: ViewModifier {
|
|
func body(content: Content) -> some View {
|
|
#if os(tvOS)
|
|
content
|
|
.pickerStyle(.inline)
|
|
.onAppear {
|
|
// Force refresh to apply button style to picker options
|
|
}
|
|
#elseif os(iOS)
|
|
content
|
|
.pickerStyle(.automatic)
|
|
#else
|
|
content
|
|
.labelsHidden()
|
|
.pickerStyle(.menu)
|
|
#endif
|
|
}
|
|
}
|
|
|
|
#if os(tvOS)
|
|
// Extension to help remove picker row backgrounds
|
|
extension View {
|
|
func pickerRowStyle() -> some View {
|
|
self.buttonStyle(.plain)
|
|
.listRowBackground(Color.clear)
|
|
}
|
|
}
|
|
#endif
|