[gnome-shell/wip/fmuellner/symbolic-user-icon] system: Always use default avatar in switch-user submenu
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/symbolic-user-icon] system: Always use default avatar in switch-user submenu
- Date: Tue, 5 Feb 2019 13:01:02 +0000 (UTC)
commit 59bebcf7d34823765eb559ee83dd4cd48f13dd21
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Feb 5 13:55:14 2019 +0100
system: Always use default avatar in switch-user submenu
It is too small to be really useful, and sticks out being the
only color icon.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/957
data/theme/gnome-shell-sass/_common.scss | 6 +-----
js/ui/status/system.js | 23 ++++-------------------
2 files changed, 5 insertions(+), 24 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
index 1c4f85f89..f1cc16237 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -1080,11 +1080,7 @@ StScrollBar {
// a little unstructured mess:
- .system-switch-user-submenu-icon.user-icon {
- icon-size: 20px;
- padding: 0 2px;
- }
- .system-switch-user-submenu-icon.default-icon {
+ .system-switch-user-submenu-icon {
icon-size: 16px;
padding: 0 4px;
}
diff --git a/js/ui/status/system.js b/js/ui/status/system.js
index bbbc44ea1..0791bdcb4 100644
--- a/js/ui/status/system.js
+++ b/js/ui/status/system.js
@@ -175,24 +175,6 @@ var Indicator = class extends PanelMenu.SystemIndicator {
let layout = clutterText.get_layout();
if (layout.is_ellipsized())
this._switchUserSubMenu.label.text = this._user.get_user_name();
-
- let iconFile = this._user.get_icon_file();
- if (iconFile && !GLib.file_test(iconFile, GLib.FileTest.EXISTS))
- iconFile = null;
-
- if (iconFile) {
- let file = Gio.File.new_for_path(iconFile);
- let gicon = new Gio.FileIcon({ file: file });
- this._switchUserSubMenu.icon.gicon = gicon;
-
- this._switchUserSubMenu.icon.add_style_class_name('user-icon');
- this._switchUserSubMenu.icon.remove_style_class_name('default-icon');
- } else {
- this._switchUserSubMenu.icon.icon_name = 'avatar-default-symbolic';
-
- this._switchUserSubMenu.icon.add_style_class_name('default-icon');
- this._switchUserSubMenu.icon.remove_style_class_name('user-icon');
- }
}
_createActionButton(iconName, accessibleName) {
@@ -210,7 +192,10 @@ var Indicator = class extends PanelMenu.SystemIndicator {
let item;
this._switchUserSubMenu = new PopupMenu.PopupSubMenuMenuItem('', true);
- this._switchUserSubMenu.icon.style_class = 'system-switch-user-submenu-icon';
+ this._switchUserSubMenu.icon.set({
+ icon_name: 'avatar-default-symbolic',
+ style_class: 'system-switch-user-submenu-icon'
+ });
// Since the label of the switch user submenu depends on the width of
// the popup menu, and we can't easily connect on allocation-changed
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]