mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Player controls UI changes
WIP on controls Chapters working Add previews variable Add lists ids WIP
This commit is contained in:
22
Shared/Player/Controls/ControlBackgroundModifier.swift
Normal file
22
Shared/Player/Controls/ControlBackgroundModifier.swift
Normal file
@@ -0,0 +1,22 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct ControlBackgroundModifier: ViewModifier {
|
||||
var enabled = true
|
||||
var edgesIgnoringSafeArea = Edge.Set()
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
if enabled {
|
||||
content
|
||||
#if os(macOS)
|
||||
.background(VisualEffectBlur(material: .hudWindow))
|
||||
#elseif os(iOS)
|
||||
.background(VisualEffectBlur(blurStyle: .systemThinMaterial).edgesIgnoringSafeArea(edgesIgnoringSafeArea))
|
||||
#else
|
||||
.background(.thinMaterial)
|
||||
#endif
|
||||
} else {
|
||||
content
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user