Skip to content

Commit 9fa18e6

Browse files
authored
Remove previous track actors from coverBox (#13648)
* Remove previous track actors from coverBox Fix bug where previous tracks render under current track. * Improve cover image display logic Refactor cover image handling in the sound applet.
1 parent 6316ca8 commit 9fa18e6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

files/usr/share/cinnamon/applets/[email protected]/applet.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,11 @@ class Player extends PopupMenu.PopupMenuSection {
882882

883883
_showCover(cover_path) {
884884
if (! cover_path || ! GLib.file_test(cover_path, GLib.FileTest.EXISTS)) {
885-
this.cover = new St.Icon({style_class: 'sound-player-generic-coverart', important: true, icon_name: "media-optical", icon_size: 300, icon_type: St.IconType.FULLCOLOR});
885+
let newCover = new St.Icon({style_class: 'sound-player-generic-coverart', important: true, icon_name: "media-optical", icon_size: 300, icon_type: St.IconType.FULLCOLOR});
886+
this.coverBox.remove_actor(this.cover);
887+
this.cover = newCover;
888+
this.coverBox.add_actor(this.cover);
889+
this.coverBox.set_child_below_sibling(this.cover, this.trackInfo);
886890
this._cover_path = null;
887891
this._applet.setAppletTextIcon(this, null);
888892
}

0 commit comments

Comments
 (0)