notification: Show symbolic icons in a circle and smaller
Huge symbolic icons look bad therefore we special case them, this obviously can only work for icons that use the system icons. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3066>
This commit is contained in:
parent
f233aebe3a
commit
8fed0b83d0
@ -137,6 +137,14 @@
|
|||||||
> StIcon {
|
> StIcon {
|
||||||
icon-size: $base_icon_size * 3; // 48px
|
icon-size: $base_icon_size * 3; // 48px
|
||||||
-st-icon-style: symbolic;
|
-st-icon-style: symbolic;
|
||||||
|
|
||||||
|
.message-themed-icon {
|
||||||
|
border-radius: $forced_circular_radius; // is circular
|
||||||
|
background-color: transparentize($fg_color, 0.8);
|
||||||
|
icon-size: $base_icon_size;
|
||||||
|
min-width: $base_icon_size * 3;
|
||||||
|
min-height: $base_icon_size * 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -790,10 +790,11 @@ class NotificationMessage extends MessageList.Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_getIcon() {
|
_getIcon() {
|
||||||
if (this.notification.gicon) {
|
const {gicon} = this.notification;
|
||||||
return new St.Icon({
|
if (gicon) {
|
||||||
gicon: this.notification.gicon,
|
const styleClass =
|
||||||
});
|
gicon instanceof Gio.ThemedIcon ? 'message-themed-icon' : '';
|
||||||
|
return new St.Icon({gicon, styleClass});
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user