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

42f94a
From 519df156f73419d83fbd043e73abc8d3f93233b0 Mon Sep 17 00:00:00 2001
42f94a
From: Ray Strode <rstrode@redhat.com>
42f94a
Date: Wed, 15 Jan 2014 16:45:34 -0500
42f94a
Subject: [PATCH] panel: add an icon to the ActivitiesButton
42f94a
42f94a
---
42f94a
 data/theme/gnome-shell-sass/_common.scss | 5 +++++
42f94a
 js/ui/panel.js                           | 9 ++++++++-
42f94a
 2 files changed, 13 insertions(+), 1 deletion(-)
42f94a
42f94a
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
42f94a
index 1b0c20650..639f062f1 100644
42f94a
--- a/data/theme/gnome-shell-sass/_common.scss
42f94a
+++ b/data/theme/gnome-shell-sass/_common.scss
42f94a
@@ -749,60 +749,65 @@ StScrollBar {
42f94a
     -panel-corner-background-color: rgba(0, 0, 0, 0.35);
42f94a
     -panel-corner-border-width: 2px;
42f94a
     -panel-corner-border-color: transparent;
42f94a
 
42f94a
     &:active, &:overview, &:focus {
42f94a
       -panel-corner-border-color: lighten($selected_bg_color,5%);
42f94a
     }
42f94a
 
42f94a
     &.lock-screen, &.login-screen, &.unlock-screen {
42f94a
       -panel-corner-radius: 0;
42f94a
       -panel-corner-background-color: transparent;
42f94a
       -panel-corner-border-color: transparent;
42f94a
     }
42f94a
   }
42f94a
 
42f94a
   .panel-button {
42f94a
     -natural-hpadding: 12px;
42f94a
     -minimum-hpadding: 6px;
42f94a
     font-weight: bold;
42f94a
     color: #eee;
42f94a
     text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.9);
42f94a
     transition-duration: 100ms;
42f94a
 
42f94a
     .app-menu-icon {
42f94a
       -st-icon-style: symbolic;
42f94a
       margin-left: 4px;
42f94a
       margin-right: 4px;
42f94a
       //dimensions of the icon are hardcoded
42f94a
     }
42f94a
 
42f94a
+    .panel-logo-icon {
42f94a
+      padding-right: .4em;
42f94a
+      icon-size: 1em;
42f94a
+    }
42f94a
+
42f94a
     .system-status-icon,
42f94a
     .app-menu-icon > StIcon,
42f94a
     .popup-menu-arrow {
42f94a
       icon-shadow: 0px 1px 2px rgba(0, 0, 0, 0.9);
42f94a
     }
42f94a
 
42f94a
     &:hover {
42f94a
       color: lighten($fg_color, 10%);
42f94a
       text-shadow: 0px 1px 6px rgba(0, 0, 0, 1);
42f94a
 
42f94a
       .system-status-icon,
42f94a
       .app-menu-icon > StIcon,
42f94a
       .popup-menu-arrow {
42f94a
         icon-shadow: 0px 1px 6px rgba(0, 0, 0, 1);
42f94a
       }
42f94a
     }
42f94a
 
42f94a
     &:active, &:overview, &:focus, &:checked {
42f94a
       // Trick due to St limitations. It needs a background to draw
42f94a
       // a box-shadow
42f94a
       background-color: rgba(0, 0, 0, 0.01);
42f94a
       box-shadow: inset 0 -2px 0px lighten($selected_bg_color,5%);
42f94a
       color: lighten($fg_color,10%);
42f94a
 
42f94a
       & > .system-status-icon { icon-shadow: black 0 2px 2px; }
42f94a
     }
42f94a
 
42f94a
     .system-status-icon { icon-size: 1.09em; padding: 0 5px; }
42f94a
     .unlock-screen &,
42f94a
     .login-screen &,
42f94a
diff --git a/js/ui/panel.js b/js/ui/panel.js
42f94a
index 2f593247d..d1a572503 100644
42f94a
--- a/js/ui/panel.js
42f94a
+++ b/js/ui/panel.js
42f94a
@@ -379,65 +379,72 @@ var AppMenuButton = new Lang.Class({
42f94a
         }
42f94a
         if (this._overviewShowingId > 0) {
42f94a
             Main.overview.disconnect(this._overviewShowingId);
42f94a
             this._overviewShowingId = 0;
42f94a
         }
42f94a
         if (this._showsAppMenuId > 0) {
42f94a
             this._gtkSettings.disconnect(this._showsAppMenuId);
42f94a
             this._showsAppMenuId = 0;
42f94a
         }
42f94a
         if (this._switchWorkspaceNotifyId > 0) {
42f94a
             global.window_manager.disconnect(this._switchWorkspaceNotifyId);
42f94a
             this._switchWorkspaceNotifyId = 0;
42f94a
         }
42f94a
 
42f94a
         this.parent();
42f94a
     }
42f94a
 });
42f94a
 
42f94a
 Signals.addSignalMethods(AppMenuButton.prototype);
42f94a
 
42f94a
 var ActivitiesButton = new Lang.Class({
42f94a
     Name: 'ActivitiesButton',
42f94a
     Extends: PanelMenu.Button,
42f94a
 
42f94a
     _init() {
42f94a
         this.parent(0.0, null, true);
42f94a
         this.actor.accessible_role = Atk.Role.TOGGLE_BUTTON;
42f94a
 
42f94a
         this.actor.name = 'panelActivities';
42f94a
 
42f94a
+        let box = new St.BoxLayout();
42f94a
+        this.actor.add_actor(box);
42f94a
+        let iconFile = Gio.File.new_for_path('/usr/share/icons/hicolor/scalable/apps/start-here.svg');
42f94a
+        this._icon = new St.Icon({ gicon: new Gio.FileIcon({ file: iconFile }),
42f94a
+                                   style_class: 'panel-logo-icon' });
42f94a
+        box.add_actor(this._icon);
42f94a
+
42f94a
         /* Translators: If there is no suitable word for "Activities"
42f94a
            in your language, you can use the word for "Overview". */
42f94a
         this._label = new St.Label({ text: _("Activities"),
42f94a
                                      y_align: Clutter.ActorAlign.CENTER });
42f94a
-        this.actor.add_actor(this._label);
42f94a
+        box.add_actor(this._label);
42f94a
 
42f94a
         this.actor.label_actor = this._label;
42f94a
 
42f94a
         this.actor.connect('captured-event', this._onCapturedEvent.bind(this));
42f94a
         this.actor.connect_after('key-release-event', this._onKeyRelease.bind(this));
42f94a
 
42f94a
         Main.overview.connect('showing', () => {
42f94a
             this.actor.add_style_pseudo_class('overview');
42f94a
             this.actor.add_accessible_state (Atk.StateType.CHECKED);
42f94a
         });
42f94a
         Main.overview.connect('hiding', () => {
42f94a
             this.actor.remove_style_pseudo_class('overview');
42f94a
             this.actor.remove_accessible_state (Atk.StateType.CHECKED);
42f94a
         });
42f94a
 
42f94a
         this._xdndTimeOut = 0;
42f94a
     },
42f94a
 
42f94a
     handleDragOver(source, actor, x, y, time) {
42f94a
         if (source != Main.xdndHandler)
42f94a
             return DND.DragMotionResult.CONTINUE;
42f94a
 
42f94a
         if (this._xdndTimeOut != 0)
42f94a
             Mainloop.source_remove(this._xdndTimeOut);
42f94a
         this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT, () => {
42f94a
             this._xdndToggleOverview(actor);
42f94a
         });
42f94a
         GLib.Source.set_name_by_id(this._xdndTimeOut, '[gnome-shell] this._xdndToggleOverview');
42f94a
 
42f94a
         return DND.DragMotionResult.CONTINUE;
42f94a
-- 
42f94a
2.17.1
42f94a