Blame SOURCES/0001-panel-add-an-icon-to-the-ActivitiesButton.patch

35159f
From aadb0e19999c339ac1d6501a2e52b363e57e26ef Mon Sep 17 00:00:00 2001
35159f
From: Ray Strode <rstrode@redhat.com>
35159f
Date: Wed, 15 Jan 2014 16:45:34 -0500
35159f
Subject: [PATCH] panel: add an icon to the ActivitiesButton
35159f
35159f
Requested by brand
35159f
---
35159f
 data/theme/gnome-shell-sass/_common.scss | 5 +++++
35159f
 js/ui/panel.js                           | 9 ++++++++-
35159f
 2 files changed, 13 insertions(+), 1 deletion(-)
35159f
35159f
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
35159f
index a382ce561..3b0d2bf04 100644
35159f
--- a/data/theme/gnome-shell-sass/_common.scss
35159f
+++ b/data/theme/gnome-shell-sass/_common.scss
35159f
@@ -769,6 +769,11 @@ StScrollBar {
35159f
       //dimensions of the icon are hardcoded
35159f
     }
35159f
 
35159f
+    .panel-logo-icon {
35159f
+      padding-right: .4em;
35159f
+      icon-size: 1em;
35159f
+    }
35159f
+
35159f
     &:hover {
35159f
       color: lighten($fg_color, 10%);
35159f
     }
35159f
diff --git a/js/ui/panel.js b/js/ui/panel.js
35159f
index 16484850a..ede1c2b82 100644
35159f
--- a/js/ui/panel.js
35159f
+++ b/js/ui/panel.js
35159f
@@ -465,11 +465,18 @@ class ActivitiesButton extends PanelMenu.Button {
35159f
 
35159f
         this.actor.name = 'panelActivities';
35159f
 
35159f
+        let box = new St.BoxLayout();
35159f
+        this.actor.add_actor(box);
35159f
+        let iconFile = Gio.File.new_for_path('/usr/share/icons/hicolor/scalable/apps/start-here.svg');
35159f
+        this._icon = new St.Icon({ gicon: new Gio.FileIcon({ file: iconFile }),
35159f
+                                   style_class: 'panel-logo-icon' });
35159f
+        box.add_actor(this._icon);
35159f
+
35159f
         /* Translators: If there is no suitable word for "Activities"
35159f
            in your language, you can use the word for "Overview". */
35159f
         this._label = new St.Label({ text: _("Activities"),
35159f
                                      y_align: Clutter.ActorAlign.CENTER });
35159f
-        this.actor.add_actor(this._label);
35159f
+        box.add_actor(this._label);
35159f
 
35159f
         this.actor.label_actor = this._label;
35159f
 
35159f
-- 
35159f
2.21.0
35159f