mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue