[gnome-shell/wip/fmuellner/window-close: 2/2] theme: Drop custom assets for window close buttons in overview



commit 4d2dce2c52d3570deafbe7420305a7863223144c
Author: Sam Hewitt <sam snwh org>
Date:   Fri Nov 16 11:15:44 2018 -0500

    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(-)
---
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 @@
     <file>checkbox-off-focused.svg</file>
     <file>checkbox-off.svg</file>
     <file>checkbox.svg</file>
-    <file>close-window.svg</file>
-    <file>close-window-active.svg</file>
-    <file>close-window-hover.svg</file>
     <file>dash-placeholder.svg</file>
     <file>gnome-shell.css</file>
     <file>gnome-shell-high-contrast.css</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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]