[gnome-software: 1/2] Add drop-shadows in status pages using the app's icon




commit fd209f5036c6a9e3b2269a744c9d5098a0c43139
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Sep 1 08:58:23 2021 +0200

    Add drop-shadows in status pages using the app's icon

 src/gs-first-run-dialog.ui | 3 +++
 src/gs-loading-page.ui     | 3 +++
 src/gtk-style.css          | 9 +++++++++
 3 files changed, 15 insertions(+)
---
diff --git a/src/gs-first-run-dialog.ui b/src/gs-first-run-dialog.ui
index 012f76ea0..4db6cbfaa 100644
--- a/src/gs-first-run-dialog.ui
+++ b/src/gs-first-run-dialog.ui
@@ -26,6 +26,9 @@
             <property name="icon_name">org.gnome.Software</property>
             <property name="title" translatable="yes">Welcome to Software</property>
             <property name="description" translatable="yes">Software lets you install all the software you 
need, all from one place. See our recommendations, browse the categories, or search for the applications you 
want.</property>
+            <style>
+              <class name="icon-dropshadow"/>
+            </style>
             <child>
               <object class="GtkButton" id="button">
                 <property name="label" translatable="yes">_Browse Software</property>
diff --git a/src/gs-loading-page.ui b/src/gs-loading-page.ui
index be61d6f9a..fb631f54a 100644
--- a/src/gs-loading-page.ui
+++ b/src/gs-loading-page.ui
@@ -12,6 +12,9 @@
         <property name="visible">True</property>
         <property name="icon_name">org.gnome.Software</property>
         <property name="title" translatable="yes">Starting up…</property>
+        <style>
+          <class name="icon-dropshadow"/>
+        </style>
         <child>
           <object class="HdyClamp">
             <property name="visible">True</property>
diff --git a/src/gtk-style.css b/src/gtk-style.css
index 3e5a0d474..5cc4a0f26 100644
--- a/src/gtk-style.css
+++ b/src/gtk-style.css
@@ -829,3 +829,12 @@ scrolledwindow.fake-hdy-status-page > viewport > box { margin: 36px 12px; }
 scrolledwindow.fake-hdy-status-page > viewport > box > clamp:not(:last-child) > box { margin-bottom: 36px; }
 scrolledwindow.fake-hdy-status-page > viewport > box > clamp > box > .icon:not(:last-child) { margin-bottom: 
36px; }
 scrolledwindow.fake-hdy-status-page > viewport > box > clamp > box > .title:not(:last-child) { 
margin-bottom: 12px; }
+
+statuspage.icon-dropshadow image.icon {
+  /* This copies the style of .icon-dropshadow from Adwaita. */
+  -gtk-icon-shadow: 0 1px 12px rgba(0,0,0,0.05),
+      0 -1px rgba(0,0,0,0.05),
+      1px 0 rgba(0,0,0,0.1),
+      0 1px rgba(0,0,0,0.3),
+      -1px 0 rgba(0,0,0,0.1);
+}


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