mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
messageList: Only apply special styling to symbolic icons
The styling introduced in commit8fed0b83dwas only intended for symbolics, it looks weird when applied to full-color icons. So instead of using the GIcon type, apply the special styling based on the new StIcon:is-symbolic property. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7620 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3296> (cherry picked from commita94b80b2d4)
This commit is contained in:
parent
03253382ee
commit
ddaeec69d8
1 changed files with 7 additions and 5 deletions
|
|
@ -478,6 +478,13 @@ export const Message = GObject.registerClass({
|
|||
});
|
||||
hbox.add_child(this._icon);
|
||||
|
||||
this._icon.connect('notify::is-symbolic', () => {
|
||||
if (this._icon.is_symbolic)
|
||||
this._icon.add_style_class_name('message-themed-icon');
|
||||
else
|
||||
this._icon.remove_style_class_name('message-themed-icon');
|
||||
});
|
||||
|
||||
const contentBox = new St.BoxLayout({
|
||||
style_class: 'message-content',
|
||||
vertical: true,
|
||||
|
|
@ -534,11 +541,6 @@ export const Message = GObject.registerClass({
|
|||
set icon(icon) {
|
||||
this._icon.gicon = icon;
|
||||
|
||||
if (icon instanceof Gio.ThemedIcon)
|
||||
this._icon.add_style_class_name('message-themed-icon');
|
||||
else
|
||||
this._icon.remove_style_class_name('message-themed-icon');
|
||||
|
||||
this._icon.visible = !!icon;
|
||||
this.notify('icon');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue