mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Merge pull request #533 from dnicolson/fix-tvos-settings-icon-alignment
Fix tvOS settings icon alignment
This commit is contained in:
commit
1be62cc7ad
@ -119,6 +119,20 @@ struct SettingsView: View {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct SettingsLabel: LabelStyle {
|
||||||
|
func makeBody(configuration: Configuration) -> some View {
|
||||||
|
#if os(tvOS)
|
||||||
|
Label {
|
||||||
|
configuration.title.padding(.leading, 10)
|
||||||
|
} icon: {
|
||||||
|
configuration.icon
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
Label(configuration)
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if !os(macOS)
|
#if !os(macOS)
|
||||||
var settingsList: some View {
|
var settingsList: some View {
|
||||||
List {
|
List {
|
||||||
@ -141,51 +155,51 @@ struct SettingsView: View {
|
|||||||
NavigationLink {
|
NavigationLink {
|
||||||
BrowsingSettings()
|
BrowsingSettings()
|
||||||
} label: {
|
} label: {
|
||||||
Label("Browsing", systemImage: "list.and.film")
|
Label("Browsing", systemImage: "list.and.film").labelStyle(SettingsLabel())
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
PlayerSettings()
|
PlayerSettings()
|
||||||
} label: {
|
} label: {
|
||||||
Label("Player", systemImage: "play.rectangle")
|
Label("Player", systemImage: "play.rectangle").labelStyle(SettingsLabel())
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
PlayerControlsSettings()
|
PlayerControlsSettings()
|
||||||
} label: {
|
} label: {
|
||||||
Label("Controls", systemImage: "hand.tap")
|
Label("Controls", systemImage: "hand.tap").labelStyle(SettingsLabel())
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
QualitySettings()
|
QualitySettings()
|
||||||
} label: {
|
} label: {
|
||||||
Label("Quality", systemImage: "4k.tv")
|
Label("Quality", systemImage: "4k.tv").labelStyle(SettingsLabel())
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
HistorySettings()
|
HistorySettings()
|
||||||
} label: {
|
} label: {
|
||||||
Label("History", systemImage: "clock.arrow.circlepath")
|
Label("History", systemImage: "clock.arrow.circlepath").labelStyle(SettingsLabel())
|
||||||
}
|
}
|
||||||
|
|
||||||
if !accounts.isEmpty {
|
if !accounts.isEmpty {
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
SponsorBlockSettings()
|
SponsorBlockSettings()
|
||||||
} label: {
|
} label: {
|
||||||
Label("SponsorBlock", systemImage: "dollarsign.circle")
|
Label("SponsorBlock", systemImage: "dollarsign.circle").labelStyle(SettingsLabel())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
LocationsSettings()
|
LocationsSettings()
|
||||||
} label: {
|
} label: {
|
||||||
Label("Locations", systemImage: "globe")
|
Label("Locations", systemImage: "globe").labelStyle(SettingsLabel())
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
AdvancedSettings()
|
AdvancedSettings()
|
||||||
} label: {
|
} label: {
|
||||||
Label("Advanced", systemImage: "wrench.and.screwdriver")
|
Label("Advanced", systemImage: "wrench.and.screwdriver").labelStyle(SettingsLabel())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
@ -196,7 +210,7 @@ struct SettingsView: View {
|
|||||||
NavigationLink {
|
NavigationLink {
|
||||||
Help()
|
Help()
|
||||||
} label: {
|
} label: {
|
||||||
Label("Help", systemImage: "questionmark.circle")
|
Label("Help", systemImage: "questionmark.circle").labelStyle(SettingsLabel())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
|
Loading…
Reference in New Issue
Block a user