[gnome-shell/wip/fmuellner/window-close: 8/8] theme: Drop custom assets for window close buttons in overview
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/window-close: 8/8] theme: Drop custom assets for window close buttons in overview
- Date: Thu, 22 Nov 2018 22:49:35 +0000 (UTC)
commit 855c0dc65b18b519f89d4274caea6fa028cde3e7
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 e292d33a3..b43bb0e26 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 829791419..9e2a39ca8 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]