[gnome-shell] screenshot-ui: Add a check icon to selected window



commit 1321bb755786d1554ff5c8cc462fa80e874bd258
Author: Ivan Molodetskikh <yalterz gmail com>
Date:   Fri Dec 17 08:58:00 2021 +0300

    screenshot-ui: Add a check icon to selected window
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>

 data/theme/gnome-shell-sass/widgets/_screenshot.scss | 13 +++++++++++++
 js/ui/screenshot.js                                  |  7 +++++++
 2 files changed, 20 insertions(+)
---
diff --git a/data/theme/gnome-shell-sass/widgets/_screenshot.scss 
b/data/theme/gnome-shell-sass/widgets/_screenshot.scss
index 0a626aa2ea..0abc0f85c2 100644
--- a/data/theme/gnome-shell-sass/widgets/_screenshot.scss
+++ b/data/theme/gnome-shell-sass/widgets/_screenshot.scss
@@ -113,6 +113,14 @@
   border: 6px transparent;
 }
 
+.screenshot-ui-window-selector-check {
+  transition-duration: 200ms;
+  color: transparent;
+  border-radius: 99px;
+  border-width: 12px;
+  icon-size: 24px;
+}
+
 .screenshot-ui-window-selector-window {
   &:hover {
     .screenshot-ui-window-selector-window-border {
@@ -124,6 +132,11 @@
       border-color: $selected_bg_color;
       background-color: transparentize($selected_bg_color, 0.8);
     }
+
+    .screenshot-ui-window-selector-check {
+      color: white;
+      background-color: $selected_bg_color;
+    }
   }
 }
 
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index dbb993e74a..afb3277a27 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -719,6 +719,13 @@ class UIWindowSelectorWindow extends St.Button {
         });
         this.add_child(this._border);
 
+        this._border.child = new St.Icon({
+            icon_name: 'object-select-symbolic',
+            style_class: 'screenshot-ui-window-selector-check',
+            x_align: Clutter.ActorAlign.CENTER,
+            y_align: Clutter.ActorAlign.CENTER,
+        });
+
         this.connect('destroy', this._onDestroy.bind(this));
     }
 


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