diff --git a/data/Makefile.am b/data/Makefile.am index 7a80948b6..09db7c6c1 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -35,6 +35,7 @@ dist_theme_DATA = \ theme/filter-selected-ltr.svg \ theme/filter-selected-rtl.svg \ theme/gnome-shell.css \ + theme/logged-in-indicator.svg \ theme/panel-button-border.svg \ theme/panel-button-highlight-narrow.svg \ theme/panel-button-highlight-wide.svg \ diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index a0e72f37c..6bd6d015e 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -2070,7 +2070,8 @@ StButton.popup-menu-item:insensitive { } .login-dialog-user-list-item:hover .login-dialog-user-list-item-name, -.login-dialog-user-list:expanded .login-dialog-user-list-item:focus .login-dialog-user-list-item-name { +.login-dialog-user-list:expanded .login-dialog-user-list-item:focus .login-dialog-user-list-item-name, +.login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in { color: white; text-shadow: black 0px 2px 2px; } @@ -2083,6 +2084,11 @@ StButton.popup-menu-item:insensitive { background-color: rgba(255,255,255,0.33); } +.login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in { + background-image: url("logged-in-indicator.svg"); + background-size: contain; +} + .login-dialog-user-list-item-text-box { padding: 0 0.5em; } diff --git a/data/theme/logged-in-indicator.svg b/data/theme/logged-in-indicator.svg new file mode 100644 index 000000000..c0267ea01 --- /dev/null +++ b/data/theme/logged-in-indicator.svg @@ -0,0 +1,130 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index 9b8451451..39434cf94 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -118,6 +118,7 @@ const UserListItem = new Lang.Class({ y_align: St.Align.END }); this._updateIcon(); + this._updateLoggedIn(); this.actor.connect('clicked', Lang.bind(this, this._onClicked)); }, @@ -125,6 +126,7 @@ const UserListItem = new Lang.Class({ _onUserChanged: function() { this._nameLabel.set_text(this.user.get_real_name()); this._updateIcon(); + this._updateLoggedIn(); }, _setIconFromFile: function(iconFile, styleClass) { @@ -173,12 +175,21 @@ const UserListItem = new Lang.Class({ }, syncStyleClasses: function() { + this._updateLoggedIn(); + if (global.stage.get_key_focus() == this.actor) this.actor.add_style_pseudo_class('focus'); else this.actor.remove_style_pseudo_class('focus'); }, + _updateLoggedIn: function() { + if (this.user.is_logged_in()) + this.actor.add_style_pseudo_class('logged-in'); + else + this.actor.remove_style_pseudo_class('logged-in'); + }, + _onClicked: function() { this.emit('activate'); },