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



commit d45064995c464282d69679da35827afe6fb5aa28
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Nov 15 23:18:22 2018 +0100

    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 | 22 ++++++---
 js/ui/workspace.js                       |  1 +
 6 files changed, 17 insertions(+), 256 deletions(-)
---
diff --git a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml
index c99b71ddf..dd1972acb 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>corner-ripple-ltr.png</file>
     <file>corner-ripple-rtl.png</file>
     <file>dash-placeholder.svg</file>
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
index 06c50d1d9..4cf3a6afd 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -1161,14 +1161,24 @@ StScrollBar {
 //close buttons
 
 .window-close {
-  background-image: url("resource:///org/gnome/shell/theme/close-window.svg");
-  background-size: 32px;
-  height: 32px;
-  width: 32px;
+  color: #2975c4;
+  background-color: white;
+  border: 5px solid #2975c4;
+  border-radius: 20px;
+  height: 20px;
+  width: 20px;
   -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"); }
+  &:hover {
+    background-color: #2975c4;
+    color: white;
+    border-color: white;
+  }
+  &:active {
+    background-color: #a5c8ec;
+    color: #2975c4;
+    border-color: #2975c4;
+  }
 }
 
 /* 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]