Skip to content

Commit 3478e0b

Browse files
committed
Slight UI fixes for tvOS
1 parent db1f5fb commit 3478e0b

4 files changed

Lines changed: 17 additions & 4 deletions

File tree

EPGPlayer/Shared/UI/Live/LiveChannelsView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,12 @@ struct LiveChannelsView: View {
9696
}
9797
})
9898
#endif
99+
#if !os(tvOS)
99100
.navigationTitle("Live")
100-
#if !os(macOS) && !os(tvOS)
101+
#if !os(macOS)
101102
.navigationBarTitleDisplayMode(.inline)
102103
#endif
104+
#endif
103105
}
104106
.onAppear {
105107
if channels.isEmpty || liveStreamConfig == nil {

EPGPlayer/Shared/UI/Main/MainView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ struct MainView: View {
116116
PlayerView(item: item)
117117
.environment(appState)
118118
.environmentObject(userSettings)
119+
#if os(tvOS)
120+
.ignoresSafeArea()
121+
#endif
119122
}
120123
#endif
121124
}

EPGPlayer/Shared/UI/Recordings/RecordingsView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,12 @@ struct RecordingsView: View {
111111
}
112112
}
113113
})
114+
#if !os(tvOS)
114115
.navigationTitle("Recordings")
115-
#if !os(macOS) && !os(tvOS)
116+
#if !os(macOS)
116117
.navigationBarTitleDisplayMode(.inline)
117118
#endif
119+
#endif
118120
}
119121
.onAppear {
120122
if recorded.isEmpty {

EPGPlayer/Shared/UI/Settings/SettingsView.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ struct SettingsView: View {
4444
#endif
4545
}
4646
.formStyle(.grouped)
47+
#if !os(tvOS)
4748
.navigationTitle("Settings")
48-
#if !os(macOS) && !os(tvOS)
49+
#if !os(macOS)
4950
.navigationBarTitleDisplayMode(.inline)
5051
#endif
52+
#endif
5153
.navigationDestination(isPresented: $showLicenseList, destination: {
5254
LicenseList()
5355
})
@@ -165,12 +167,13 @@ struct SettingsView: View {
165167
Text("Force 16:9")
166168
}
167169

168-
#if !os(macOS)
170+
#if !os(macOS) && !os(tvOS)
169171
Toggle(isOn: userSettings.$forceLandscape) {
170172
Text("Force landscape")
171173
}
172174
#endif
173175

176+
#if !os(tvOS)
174177
Picker(selection: userSettings.$inactiveTimer) {
175178
ForEach([3, 5, 10, 15, .max], id: \.self) { time in
176179
if time == .max {
@@ -183,13 +186,15 @@ struct SettingsView: View {
183186
Text("Auto hide UI")
184187
}
185188
.pickerStyle(.menu)
189+
#endif
186190
} header: {
187191
Label("Player Settings", systemImage: "play.rectangle")
188192
}
189193
}
190194

191195
var storageSection: some View {
192196
Section {
197+
#if !os(tvOS)
193198
Group {
194199
if let downloadSizeError {
195200
Text("Download size error: \(downloadSizeError)")
@@ -209,6 +214,7 @@ struct SettingsView: View {
209214
}
210215
}
211216
.foregroundStyle(.secondary)
217+
#endif
212218

213219
HStack {
214220
Text("Cache size: \(ByteCountFormatter().string(fromByteCount: Int64(currentCacheSize)))")

0 commit comments

Comments
 (0)