|
|
1bd53d |
From b5db4d318546654f4e9c1e4999fa00456441f105 Mon Sep 17 00:00:00 2001
|
|
|
1bd53d |
From: Ray Strode <rstrode@redhat.com>
|
|
|
1bd53d |
Date: Wed, 15 Jan 2014 16:45:34 -0500
|
|
|
1bd53d |
Subject: [PATCH] panel: add an icon to the ActivitiesButton
|
|
|
1bd53d |
|
|
|
1bd53d |
Requested by brand
|
|
|
1bd53d |
---
|
|
|
1bd53d |
data/theme/gnome-shell-sass/widgets/_panel.scss | 5 +++++
|
|
|
1bd53d |
js/ui/panel.js | 11 ++++++++++-
|
|
|
1bd53d |
2 files changed, 15 insertions(+), 1 deletion(-)
|
|
|
1bd53d |
|
|
|
1bd53d |
diff --git a/data/theme/gnome-shell-sass/widgets/_panel.scss b/data/theme/gnome-shell-sass/widgets/_panel.scss
|
|
|
1bd53d |
index 1f4650773..5f323cbc8 100644
|
|
|
1bd53d |
--- a/data/theme/gnome-shell-sass/widgets/_panel.scss
|
|
|
1bd53d |
+++ b/data/theme/gnome-shell-sass/widgets/_panel.scss
|
|
|
1bd53d |
@@ -85,6 +85,11 @@ $panel_transition_duration: 250ms; // same as the overview transition duration
|
|
|
1bd53d |
// dimensions of the icon are hardcoded
|
|
|
1bd53d |
}
|
|
|
1bd53d |
|
|
|
1bd53d |
+ .panel-logo-icon {
|
|
|
1bd53d |
+ padding-right: .4em;
|
|
|
1bd53d |
+ icon-size: 1em;
|
|
|
1bd53d |
+ }
|
|
|
1bd53d |
+
|
|
|
1bd53d |
&#panelActivities {
|
|
|
1bd53d |
-natural-hpadding: $base_padding * 3;
|
|
|
1bd53d |
}
|
|
|
1bd53d |
diff --git a/js/ui/panel.js b/js/ui/panel.js
|
|
|
1bd53d |
index 1474886ef..ad11f4ba2 100644
|
|
|
1bd53d |
--- a/js/ui/panel.js
|
|
|
1bd53d |
+++ b/js/ui/panel.js
|
|
|
1bd53d |
@@ -390,11 +390,20 @@ class ActivitiesButton extends PanelMenu.Button {
|
|
|
1bd53d |
|
|
|
1bd53d |
this.name = 'panelActivities';
|
|
|
1bd53d |
|
|
|
1bd53d |
+ const box = new St.BoxLayout();
|
|
|
1bd53d |
+ this.add_child(box);
|
|
|
1bd53d |
+ const iconFile = Gio.File.new_for_path('/usr/share/icons/hicolor/scalable/apps/start-here.svg');
|
|
|
1bd53d |
+ this._icon = new St.Icon({
|
|
|
1bd53d |
+ gicon: new Gio.FileIcon({ file: iconFile }),
|
|
|
1bd53d |
+ style_class: 'panel-logo-icon',
|
|
|
1bd53d |
+ });
|
|
|
1bd53d |
+ box.add_child(this._icon);
|
|
|
1bd53d |
+
|
|
|
1bd53d |
/* Translators: If there is no suitable word for "Activities"
|
|
|
1bd53d |
in your language, you can use the word for "Overview". */
|
|
|
1bd53d |
this._label = new St.Label({ text: _("Activities"),
|
|
|
1bd53d |
y_align: Clutter.ActorAlign.CENTER });
|
|
|
1bd53d |
- this.add_actor(this._label);
|
|
|
1bd53d |
+ box.add_child(this._label);
|
|
|
1bd53d |
|
|
|
1bd53d |
this.label_actor = this._label;
|
|
|
1bd53d |
|
|
|
1bd53d |
--
|
|
|
1bd53d |
2.31.1
|
|
|
1bd53d |
|