From a7c343292e1a96fc86059b3af1baed15cdb9d367 Mon Sep 17 00:00:00 2001 From: Joonas Henriksson Date: Sun, 1 Nov 2020 14:40:47 +0200 Subject: [PATCH] theme: Don't draw border around symbolic user-icon Recent commit [1] added a strong light border around user avatar icons, in accordance with design mockups. As a probably unintentional side-effect, the border was also added around the symbolic fallback icon, which is displayed whenever the user avatar is not available. This doesn't work well with the current design, as the strong border makes the subtle fallback icon background indistinguishable. Additionally, it doesn't match the design mockups for the symbolic avatar icon [2]. Correct this by adding a style class for when avatar image is used, and apply the border only for that case. [1] https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/498710c2ec4ea2b3297703a0e9a2ad1168c765aa [2] https://gitlab.gnome.org/Teams/Design/os-mockups/-/blob/master/lock-login/username-based-login.png Part-of: --- data/theme/gnome-shell-sass/widgets/_misc.scss | 5 ++++- js/ui/userWidget.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/data/theme/gnome-shell-sass/widgets/_misc.scss b/data/theme/gnome-shell-sass/widgets/_misc.scss index b2f22fc71..1029c3e1d 100644 --- a/data/theme/gnome-shell-sass/widgets/_misc.scss +++ b/data/theme/gnome-shell-sass/widgets/_misc.scss @@ -9,7 +9,6 @@ background-size: contain; color: $osd_fg_color; border-radius: 99px; - border: 2px $osd_fg_color; icon-size: $base_icon_size * 4; // 64px &:hover { color: lighten($osd_fg_color,30%); @@ -21,6 +20,10 @@ padding: $base_padding * 2 ; // 12px width: $base_icon_size * 2.5; height: $base_icon_size * 2.5; // 40px; } + + &.user-avatar { + border: 2px $osd_fg_color; + } } .user-widget.vertical .user-icon { diff --git a/js/ui/userWidget.js b/js/ui/userWidget.js index 40bf59df9..c376028af 100644 --- a/js/ui/userWidget.js +++ b/js/ui/userWidget.js @@ -90,6 +90,7 @@ class Avatar extends St.Bin { if (iconFile) { this.child = null; + this.add_style_class_name('user-avatar'); this.style = ` background-image: url("${iconFile}"); background-size: cover;`;