mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Fix buttons on tvOS
This commit is contained in:
parent
166482601d
commit
b1637c5ef1
@ -321,7 +321,9 @@ struct FavoriteItemView: View {
|
|||||||
itemLabel
|
itemLabel
|
||||||
.foregroundColor(.accentColor)
|
.foregroundColor(.accentColor)
|
||||||
}
|
}
|
||||||
|
#if !os(tvOS)
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
var itemNavigationLink: some View {
|
var itemNavigationLink: some View {
|
||||||
|
@ -27,9 +27,11 @@ struct AccentButton: View {
|
|||||||
.frame(maxWidth: maxWidth)
|
.frame(maxWidth: maxWidth)
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
}
|
}
|
||||||
|
#if !os(tvOS)
|
||||||
.foregroundColor(.accentColor)
|
.foregroundColor(.accentColor)
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
.background(buttonBackground)
|
.background(buttonBackground)
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
var buttonBackground: some View {
|
var buttonBackground: some View {
|
||||||
@ -40,6 +42,11 @@ struct AccentButton: View {
|
|||||||
|
|
||||||
struct OpenVideosButton_Previews: PreviewProvider {
|
struct OpenVideosButton_Previews: PreviewProvider {
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
|
VStack {
|
||||||
AccentButton(text: "Open Videos", imageSystemName: "play.circle.fill")
|
AccentButton(text: "Open Videos", imageSystemName: "play.circle.fill")
|
||||||
|
.padding(.horizontal, 100)
|
||||||
|
AccentButton(text: "Open Videos", imageSystemName: "play.circle.fill")
|
||||||
|
.padding(.horizontal, 100)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user