[gnome-shell/wip/rstrode/login-screen-extensions: 64/134] panel: add an icon to the ActivitiesButton
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/rstrode/login-screen-extensions: 64/134] panel: add an icon to the ActivitiesButton
- Date: Thu, 26 Aug 2021 19:31:00 +0000 (UTC)
commit f2c05c3936b7643a198c4e8e20d34119cb9b892c
Author: Ray Strode <rstrode redhat com>
Date: Wed Jan 15 16:45:34 2014 -0500
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
index e79f0937b8..31204b757f 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -777,6 +777,11 @@ StScrollBar {
//dimensions of the icon are hardcoded
}
+ .panel-logo-icon {
+ padding-right: .4em;
+ icon-size: 1em;
+ }
+
&:hover {
color: lighten($fg_color, 10%);
}
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 16484850aa..ede1c2b828 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -465,11 +465,18 @@ class ActivitiesButton extends PanelMenu.Button {
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]