mirror of
https://github.com/yattee/yattee.git
synced 2025-11-13 05:38:45 +00:00
Improve tvOS settings UI styling and navigation
- Add TVOSPlainToggleStyle for cleaner toggle appearance on tvOS - Remove focus overlays from settings navigation links and buttons - Apply plain button and list styles across all settings screens - Implement custom system controls picker for tvOS to avoid focus overlay - Update SettingsPickerModifier with platform-specific styling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,14 +3,28 @@ import SwiftUI
|
||||
|
||||
struct SettingsPickerModifier: ViewModifier {
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
#if os(tvOS)
|
||||
.pickerStyle(.inline)
|
||||
#endif
|
||||
#if os(iOS)
|
||||
.pickerStyle(.automatic)
|
||||
content
|
||||
.pickerStyle(.inline)
|
||||
.onAppear {
|
||||
// Force refresh to apply button style to picker options
|
||||
}
|
||||
#elseif os(iOS)
|
||||
content
|
||||
.pickerStyle(.automatic)
|
||||
#else
|
||||
.labelsHidden()
|
||||
content
|
||||
.labelsHidden()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if os(tvOS)
|
||||
// Extension to help remove picker row backgrounds
|
||||
extension View {
|
||||
func pickerRowStyle() -> some View {
|
||||
self.buttonStyle(.plain)
|
||||
.listRowBackground(Color.clear)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user