mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Fix: LockScreen UI bug
This commit is contained in:
parent
d88d9acb60
commit
e6074c4fa3
3 changed files with 61 additions and 19 deletions
|
|
@ -429,21 +429,20 @@ struct LockScreenMusicPanel: View {
|
|||
}
|
||||
|
||||
private var playPauseButton: some View {
|
||||
let frameSize: CGFloat = isExpanded ? 72 : 48
|
||||
let symbolSize: CGFloat = isExpanded ? 30 : 24
|
||||
let frameSize: CGFloat = isExpanded ? 80 : 54
|
||||
let symbolSize: CGFloat = isExpanded ? 34 : 26
|
||||
let iconName = musicManager.isPlaying ? "pause.fill" : "play.fill"
|
||||
|
||||
return Button(action: {
|
||||
return HoverButton(
|
||||
icon: iconName,
|
||||
iconColor: .white,
|
||||
scale: .large,
|
||||
pressEffect: .none
|
||||
) {
|
||||
registerInteraction()
|
||||
musicManager.togglePlay()
|
||||
}) {
|
||||
Image(systemName: musicManager.isPlaying ? "pause.fill" : "play.fill")
|
||||
.font(.system(size: symbolSize, weight: .semibold))
|
||||
.foregroundColor(.white)
|
||||
.contentTransition(.symbolEffect(.replace))
|
||||
.frame(width: frameSize, height: frameSize)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
.frame(width: frameSize, height: frameSize)
|
||||
}
|
||||
|
||||
private func controlButton(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue