mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-03-24 18:31:23 +01:00
feat: add symbol effect to lock button
This commit is contained in:
@@ -323,20 +323,13 @@ struct PenDock: View {
|
||||
canvas.locksCanvas.toggle()
|
||||
}
|
||||
} label: {
|
||||
ZStack {
|
||||
if canvas.locksCanvas {
|
||||
Image(systemName: "lock.open")
|
||||
.transition(.move(edge: .trailing).combined(with: .blurReplace))
|
||||
} else {
|
||||
Image(systemName: "lock")
|
||||
.transition(.move(edge: .leading).combined(with: .blurReplace))
|
||||
}
|
||||
}
|
||||
.contentShape(.circle)
|
||||
.frame(width: size, height: size)
|
||||
.background(.regularMaterial)
|
||||
.clipShape(.rect(cornerRadius: 8))
|
||||
Image(systemName: canvas.locksCanvas ? "lock.fill" : "lock.open.fill")
|
||||
.contentShape(.circle)
|
||||
.frame(width: size, height: size)
|
||||
.background(.regularMaterial)
|
||||
.clipShape(.rect(cornerRadius: 8))
|
||||
}
|
||||
.hoverEffect(.lift)
|
||||
.contentTransition(.symbolEffect(.replace))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user