From 42c2bf709ea55ed41693e5c34c5f9e05f44b4737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 8 Jan 2021 12:11:06 +0100 Subject: [PATCH] windowPreview: Overhaul chrome style - increase close button size - use custom close icon that's better suited for the non-default 24pxp size - use translucent light gray for both close button and window caption https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/81 Part-of: --- data/gnome-shell-theme.gresource.xml | 1 + .../widgets/_window-picker.scss | 27 +++---- data/theme/window-close-24-symbolic.svg | 71 +++++++++++++++++++ js/ui/windowPreview.js | 2 +- 4 files changed, 88 insertions(+), 13 deletions(-) create mode 100644 data/theme/window-close-24-symbolic.svg diff --git a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml index 025630faf..a91d2249a 100644 --- a/data/gnome-shell-theme.gresource.xml +++ b/data/gnome-shell-theme.gresource.xml @@ -25,6 +25,7 @@ keyboard-hide-symbolic.svg keyboard-layout-filled-symbolic.svg keyboard-shift-filled-symbolic.svg + window-close-24-symbolic.svg process-working.svg toggle-off.svg toggle-off-dark.svg diff --git a/data/theme/gnome-shell-sass/widgets/_window-picker.scss b/data/theme/gnome-shell-sass/widgets/_window-picker.scss index a39af155f..d157b91ab 100644 --- a/data/theme/gnome-shell-sass/widgets/_window-picker.scss +++ b/data/theme/gnome-shell-sass/widgets/_window-picker.scss @@ -3,7 +3,10 @@ $window_picker_spacing: $base_spacing; // 6px $window_picker_padding: $base_padding * 2; // 12px -$window_close_button_size: 24px; +$window_thumbnail_chrome_color: transparentize($osd_fg_color, 0.4); +$window_thumbnail_chrome_border: transparentize($osd_bg_color, 0.7); + +$window_close_button_size: 30px; $window_close_button_padding: 3px; // Window picker @@ -14,31 +17,31 @@ $window_close_button_padding: 3px; // Window titles .window-caption { - color: $osd_fg_color; - background-color: $osd_bg_color; - border:1px solid $osd_outer_borders_color; - border-radius: $base_border_radius + 1; + color: $osd_bg_color; + background-color: $window_thumbnail_chrome_color; + border-radius: 99px; + border: 1px solid $window_thumbnail_chrome_border; padding: $base_padding $base_padding * 2; - font-weight: bold; - @include fontsize($base_font_size + 1); } // Close button .window-close { - background-color: $selected_bg_color; - color: $selected_fg_color; - border: none; + background-color: $window_thumbnail_chrome_color; + color: $osd_bg_color; + border: 1px solid $window_thumbnail_chrome_border; border-radius: $window_close_button_size * 0.5 + $window_close_button_padding * 2; padding: $window_close_button_padding; height: $window_close_button_size; width: $window_close_button_size; box-shadow: -1px 1px 5px 0px rgba(0,0,0,0.5); + & StIcon { icon-size: 24px; } + &:hover { - background-color: lighten($selected_bg_color, 5%); + background-color: lighten($window_thumbnail_chrome_color, 5%); } &:active { - background-color: darken($selected_bg_color, 5%); + background-color: darken($window_thumbnail_chrome_color, 5%); } } diff --git a/data/theme/window-close-24-symbolic.svg b/data/theme/window-close-24-symbolic.svg new file mode 100644 index 000000000..4f328af04 --- /dev/null +++ b/data/theme/window-close-24-symbolic.svg @@ -0,0 +1,71 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/js/ui/windowPreview.js b/js/ui/windowPreview.js index 3c12b4708..b17c87be3 100644 --- a/js/ui/windowPreview.js +++ b/js/ui/windowPreview.js @@ -354,7 +354,7 @@ var WindowPreview = GObject.registerClass({ this._closeButton = new St.Button({ visible: false, style_class: 'window-close', - child: new St.Icon({ icon_name: 'window-close-symbolic' }), + child: new St.Icon({ icon_name: 'window-close-24-symbolic' }), }); this._closeButton.add_constraint(new Clutter.BindConstraint({ source: this._windowContainer,