mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
54 lines
1.5 KiB
Swift
54 lines
1.5 KiB
Swift
//
|
|
// EditPanelView.swift
|
|
// boringNotch
|
|
//
|
|
// Created by Richard Kunkli on 12/08/2024.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct EditPanelView: View {
|
|
@State var wallpaperPath: URL?
|
|
var body: some View {
|
|
VStack {
|
|
HStack {
|
|
Text("Edit layout")
|
|
.font(.system(.largeTitle, design: .rounded))
|
|
.foregroundColor(.white.opacity(0.5))
|
|
Spacer()
|
|
Button {
|
|
exit(0)
|
|
} label: {
|
|
Label("Close", systemImage: "xmark")
|
|
}
|
|
.controlSize(.extraLarge)
|
|
.buttonStyle(AccessoryBarButtonStyle())
|
|
}
|
|
.padding()
|
|
}
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top)
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
EditPanelView()
|
|
}
|
|
|
|
struct VisualEffectView: NSViewRepresentable {
|
|
let material: NSVisualEffectView.Material
|
|
let blendingMode: NSVisualEffectView.BlendingMode
|
|
|
|
func makeNSView(context _: Context) -> NSVisualEffectView {
|
|
let visualEffectView = NSVisualEffectView()
|
|
visualEffectView.material = material
|
|
visualEffectView.blendingMode = blendingMode
|
|
visualEffectView.state = NSVisualEffectView.State.active
|
|
visualEffectView.isEmphasized = true
|
|
return visualEffectView
|
|
}
|
|
|
|
func updateNSView(_ visualEffectView: NSVisualEffectView, context _: Context) {
|
|
visualEffectView.material = material
|
|
visualEffectView.blendingMode = blendingMode
|
|
}
|
|
}
|