mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-02 10:37:50 +00:00
MediaMini: hide when no media is playing
This commit is contained in:
@@ -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}` : "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user