From 4d2dce2c52d3570deafbe7420305a7863223144c Mon Sep 17 00:00:00 2001 From: Sam Hewitt Date: Fri, 16 Nov 2018 11:15:44 -0500 Subject: [PATCH 12/25] theme: Drop custom assets for window close buttons in overview They can be replaced by a themed icon and some CSS styling. https://gitlab.gnome.org/GNOME/gnome-shell/issues/782 --- data/gnome-shell-theme.gresource.xml | 3 - data/theme/close-window-active.svg | 81 ---------------------- data/theme/close-window-hover.svg | 81 ---------------------- data/theme/close-window.svg | 85 ------------------------ data/theme/gnome-shell-sass/_common.scss | 28 +++++--- js/ui/workspace.js | 1 + 6 files changed, 21 insertions(+), 258 deletions(-) delete mode 100644 data/theme/close-window-active.svg delete mode 100644 data/theme/close-window-hover.svg delete mode 100644 data/theme/close-window.svg diff --git a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml index 451d0980e..4a4a0edfc 100644 --- a/data/gnome-shell-theme.gresource.xml +++ b/data/gnome-shell-theme.gresource.xml @@ -8,9 +8,6 @@ checkbox-off-focused.svg checkbox-off.svg checkbox.svg - close-window.svg - close-window-active.svg - close-window-hover.svg dash-placeholder.svg gnome-shell.css gnome-shell-high-contrast.css diff --git a/data/theme/close-window-active.svg b/data/theme/close-window-active.svg deleted file mode 100644 index 6242cb17f..000000000 --- a/data/theme/close-window-active.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/data/theme/close-window-hover.svg b/data/theme/close-window-hover.svg deleted file mode 100644 index 2377bfb94..000000000 --- a/data/theme/close-window-hover.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/data/theme/close-window.svg b/data/theme/close-window.svg deleted file mode 100644 index e716f7649..000000000 --- a/data/theme/close-window.svg +++ /dev/null @@ -1,85 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss index c905b3b75..528202161 100644 --- a/data/theme/gnome-shell-sass/_common.scss +++ b/data/theme/gnome-shell-sass/_common.scss @@ -1160,14 +1160,26 @@ StScrollBar { //close buttons .window-close { - background-image: url("resource:///org/gnome/shell/theme/close-window.svg"); - background-size: 32px; - height: 32px; - width: 32px; - -shell-close-overlap: 16px; - - &:hover { background-image: url("resource:///org/gnome/shell/theme/close-window-hover.svg"); } - &:active { background-image: url("resource:///org/gnome/shell/theme/close-window-active.svg"); } + background-color: white; + border-radius: 24px; + border: 4px solid $selected_bg_color; + box-shadow: inset 0 -4px 0 0 transparentize($selected_bg_color, 0.5); + color: $selected_bg_color; + height: 24px; + width: 24px; + -shell-close-overlap: 14px; + + &:hover { + background-color: $selected_bg_color; + border-color: white; + color: white; + } + + &:active { + background-color: mix(white, $selected_bg_color, 75%); + border-color: $selected_bg_color; + color: $selected_bg_color; + } } /* NETWORK DIALOGS */ diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 97c2d3a58..baa8a4380 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -473,6 +473,7 @@ var WindowOverlay = new Lang.Class({ }); let button = new St.Button({ style_class: 'window-close' }); + button.add_actor(new St.Icon({ icon_name: 'window-close-symbolic' })); button._overlap = 0; this._idleToggleCloseId = 0; -- 2.20.0