MediaMini: hide when no media is playing

This commit is contained in:
Ly-sec
2025-09-25 12:11:49 +02:00
parent 36489491e4
commit 8dad25f79c
+4
View File
@@ -41,6 +41,10 @@ Item {
// Fixed width - no expansion
readonly property real widgetWidth: Math.max(1, screen.width * 0.06)
// Visibility: hide when there's no active playback
readonly property bool hasTrack: getTitle() !== ""
visible: MediaService.isPlaying && hasTrack
function getTitle() {
return MediaService.trackTitle + (MediaService.trackArtist !== "" ? ` - ${MediaService.trackArtist}` : "")
}