Fix compile error on tvOS
This commit is contained in:
parent
aba5081450
commit
248f1e7257
|
@ -99,13 +99,6 @@ extension ThemeWindowModifier {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ThemeNavigationDetailModifier {
|
|
||||||
func body(content: Content) -> some View {
|
|
||||||
content
|
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension ThemePlainButtonModifier {
|
extension ThemePlainButtonModifier {
|
||||||
func body(content: Content) -> some View {
|
func body(content: Content) -> some View {
|
||||||
Button(action: action) {
|
Button(action: action) {
|
||||||
|
|
|
@ -53,12 +53,6 @@ extension ThemeWindowModifier {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ThemeNavigationDetailModifier {
|
|
||||||
func body(content: Content) -> some View {
|
|
||||||
content
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension ThemePlainButtonModifier {
|
extension ThemePlainButtonModifier {
|
||||||
func body(content: Content) -> some View {
|
func body(content: Content) -> some View {
|
||||||
Button(action: action) {
|
Button(action: action) {
|
||||||
|
|
|
@ -91,15 +91,19 @@ extension View {
|
||||||
modifier(ThemeSectionWithHeaderFooterModifier(header: header, footer: footer))
|
modifier(ThemeSectionWithHeaderFooterModifier(header: header, footer: footer))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func themeNavigationDetail() -> some View {
|
||||||
|
#if os(iOS)
|
||||||
|
navigationBarTitleDisplayMode(.inline)
|
||||||
|
#else
|
||||||
|
self
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
public func themeWindow(width: CGFloat, height: CGFloat) -> some View {
|
public func themeWindow(width: CGFloat, height: CGFloat) -> some View {
|
||||||
modifier(ThemeWindowModifier(size: .init(width: width, height: height)))
|
modifier(ThemeWindowModifier(size: .init(width: width, height: height)))
|
||||||
}
|
}
|
||||||
|
|
||||||
public func themeNavigationDetail() -> some View {
|
|
||||||
modifier(ThemeNavigationDetailModifier())
|
|
||||||
}
|
|
||||||
|
|
||||||
public func themePlainButton(action: @escaping () -> Void) -> some View {
|
public func themePlainButton(action: @escaping () -> Void) -> some View {
|
||||||
modifier(ThemePlainButtonModifier(action: action))
|
modifier(ThemePlainButtonModifier(action: action))
|
||||||
}
|
}
|
||||||
|
@ -292,9 +296,6 @@ struct ThemeWindowModifier: ViewModifier {
|
||||||
let size: CGSize
|
let size: CGSize
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ThemeNavigationDetailModifier: ViewModifier {
|
|
||||||
}
|
|
||||||
|
|
||||||
struct ThemePlainButtonModifier: ViewModifier {
|
struct ThemePlainButtonModifier: ViewModifier {
|
||||||
let action: () -> Void
|
let action: () -> Void
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue