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

55 lines
1.8 KiB
Diff
Raw Permalink Normal View History

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