[gnome-shell/wip/fmuellner/replace-app-menu: 40/41] panel: Desaturate appmenu icon
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/replace-app-menu: 40/41] panel: Desaturate appmenu icon
- Date: Wed, 6 Feb 2019 17:35:00 +0000 (UTC)
commit 1c117c469a23a0d2608abf39c86caca251bc1d5a
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Feb 5 00:30:41 2019 +0100
panel: Desaturate appmenu icon
Top bar icons are supposed to by symbolic, but not all applications
provide a symbolic icon. Make the stick out less by desaturating
the appmenu icon if a symbolic style is requested.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/624
js/ui/panel.js | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index e67a0fd9a..fb846fc62 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -222,9 +222,16 @@ var AppMenuButton = GObject.registerClass({
textureCache.connect('icon-theme-changed',
this._onIconThemeChanged.bind(this));
+ let iconEffect = new Clutter.DesaturateEffect();
this._iconBox = new St.Bin({ style_class: 'app-menu-icon' });
+ this._iconBox.add_effect(iconEffect);
this._container.add_actor(this._iconBox);
+ this._iconBox.connect('style-changed', () => {
+ let themeNode = this._iconBox.get_theme_node();
+ iconEffect.enabled = themeNode.get_icon_style() == St.IconStyle.SYMBOLIC;
+ });
+
this._label = new St.Label({ y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
this._container.add_actor(this._label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]