Working Lyrics and adjusted height

This commit is contained in:
Hariharan Mudaliar 2025-11-18 00:03:59 +05:30
commit 4f82ce417e
6 changed files with 116 additions and 34 deletions

View file

@ -157,6 +157,11 @@ struct MusicControlsView: View {
.fontWeight(.medium)
// Lyrics shown under the author name (same font size as author) when enabled in settings
if Defaults[.enableLyrics] {
let transition = AnyTransition.asymmetric(
insertion: .move(edge: .bottom).combined(with: .opacity),
removal: .move(edge: .top).combined(with: .opacity)
)
Text(musicManager.currentLyrics)
.font(.headline)
.foregroundColor(.white.opacity(0.8))
@ -164,8 +169,9 @@ struct MusicControlsView: View {
.multilineTextAlignment(.leading)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.top, 2)
.transition(.opacity)
.animation(.easeInOut(duration: 0.3), value: musicManager.currentLyrics)
.id(musicManager.currentLyrics)
.transition(transition)
.animation(.easeInOut(duration: 0.32), value: musicManager.currentLyrics)
}
}
}