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