mpris: Fall back to app icon first
When no cover art is available, the app icon at least allows distinguishing between different players, so try falling back to that before using the generic icon name. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2755>
This commit is contained in:
parent
35315a605b
commit
27617ef0a3
@ -70,6 +70,9 @@ class MediaMessage extends MessageList.Message {
|
||||
let file = Gio.File.new_for_uri(this._player.trackCoverUrl);
|
||||
this._icon.gicon = new Gio.FileIcon({ file });
|
||||
this._icon.remove_style_class_name('fallback');
|
||||
} else if (this._player.app) {
|
||||
this._icon.gicon = this._player.app.icon;
|
||||
this._icon.add_style_class_name('fallback');
|
||||
} else {
|
||||
this._icon.icon_name = 'audio-x-generic-symbolic';
|
||||
this._icon.add_style_class_name('fallback');
|
||||
|
Loading…
Reference in New Issue
Block a user