[gnome-shell/wip/fmuellner/dont-disturb: 416/417] calendar: Use icon instead of text for "Clear" button



commit 1afe90650da9478c29ed7951efcdc553e30313ac
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri May 4 17:15:10 2018 +0200

    calendar: Use icon instead of text for "Clear" button
    
    This makes room for additional UI elements left of the button.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/239

 data/theme/gnome-shell-sass/_common.scss | 5 +++++
 js/ui/calendar.js                        | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
index 1c4f85f89..7e0e9a634 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -1004,6 +1004,11 @@ StScrollBar {
           background-color: transparent;
           &:hover,&:focus { background-color: lighten($bg_color,5%); }
           margin: 1.5em 1.5em 0;
+          padding: 8px;
+        }
+
+        .message-list-clear-button > StIcon {
+          icon-size: 1.09em;
         }
 
         .message-list-sections {
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 32a99344c..8dc04c8a1 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -1086,8 +1086,8 @@ var CalendarMessageList = class CalendarMessageList {
         box.add_actor(this._scrollView);
 
         this._clearButton = new St.Button({ style_class: 'message-list-clear-button button',
-                                            label: _("Clear"),
                                             can_focus: true });
+        this._clearButton.add_actor(new St.Icon({ icon_name: 'edit-clear-all-symbolic' }));
         this._clearButton.set_x_align(Clutter.ActorAlign.END);
         this._clearButton.connect('clicked', () => {
             let sections = [...this._sections.keys()];


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]