diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index 24ac5798f..766ff8eec 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -860,6 +860,19 @@ StTooltip { background: #808080; } +.notification-icon-button { + border: 2px rgba(0,0,0,0.0); + border-radius: 5px; + padding: 5px; +} +.notification-icon-button:hover { + background: rgba(192,192,192,0.7); +} + +.notification-icon-button:active { + background: rgba(128,128,128,0.7); +} + .chat-received { background-gradient-direction: horizontal; background-gradient-start: #606060; diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 7ff36cd8d..7141501ef 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -19,6 +19,7 @@ const SUMMARY_TIMEOUT = 1; const HIDE_TIMEOUT = 0.2; const ICON_SIZE = 24; +const BUTTON_ICON_SIZE = 36; const MAX_SOURCE_TITLE_WIDTH = 180; @@ -262,8 +263,16 @@ Notification.prototype = { this._buttonBox = box; } - let button = new St.Button({ style_class: 'notification-button', - label: label }); + let button = new St.Button(); + + if (Gtk.IconTheme.get_default().has_icon(id)) { + button.add_style_class_name('notification-icon-button'); + button.child = St.TextureCache.get_default().load_icon_name(id, BUTTON_ICON_SIZE); + } else { + button.add_style_class_name('notification-button'); + button.label = label; + } + this._buttonBox.add(button); button.connect('clicked', Lang.bind(this, function() { this.emit('action-invoked', id); })); }, diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index da3c9297c..026fb04ba 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -245,8 +245,9 @@ NotificationDaemon.prototype = { // 'body-images', 'body-markup', // 'icon-multi', - 'icon-static' + 'icon-static', // 'sound', + 'x-gnome-icon-buttons' ]; },