[nautilus/wip/antoniof/flowbox-to-gridview: 10/24] view-icon-controller: Don't use custom selection style




commit 334c2fdcb7ef14ca9bcf0205e59f7988c9913986
Author: António Fernandes <antoniof gnome org>
Date:   Mon Jan 31 12:46:48 2022 +0000

    view-icon-controller: Don't use custom selection style
    
    We've tried to match the visual style of NautilusCanvasView selected
    items, but it falls short from being an exact match.
    
    Also, that style is outdated. Adopt a style which matches the modern
    standards, following designers advice. This is easily achieved using
    the default style from GTK.
    
    Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2105

 src/resources/css/Adwaita.css                  | 23 ++---------------------
 src/resources/ui/nautilus-view-icon-item-ui.ui |  6 ++----
 2 files changed, 4 insertions(+), 25 deletions(-)
---
diff --git a/src/resources/css/Adwaita.css b/src/resources/css/Adwaita.css
index 4edefa206..987088223 100644
--- a/src/resources/css/Adwaita.css
+++ b/src/resources/css/Adwaita.css
@@ -155,32 +155,13 @@ flowbox {
   padding: 18px;
 }
 
-flowboxchild {
-  padding: 0px;
-}
-
-flowboxchild:selected {
-  background-color:transparent;
+flowbox flowboxchild {
+  padding: 6px;
 }
 
 flowboxchild .thumbnail {
-  margin: 4px;
   box-shadow: 0px 1px 2px 0px @shade_color,
               0px 0px 0px 1px @shade_color,
               0px 2px 0px 0px @shade_color;
   border-radius: 2px;
 }
-
-.icon-ui-labels-box {
-  padding: 2px 4px;
-  border-radius: 5px;
-}
-
-flowboxchild:selected .icon-ui-labels-box {
-  background-color: @accent_bg_color;
-  color: @accent_fg_color;
-}
-
-flowboxchild:selected picture {
-  filter: sepia(1.5) hue-rotate(180deg) brightness(0.5) saturate(2.0);
-}
diff --git a/src/resources/ui/nautilus-view-icon-item-ui.ui b/src/resources/ui/nautilus-view-icon-item-ui.ui
index 7ec4eb839..b84ae21fd 100644
--- a/src/resources/ui/nautilus-view-icon-item-ui.ui
+++ b/src/resources/ui/nautilus-view-icon-item-ui.ui
@@ -9,6 +9,7 @@
         <property name="orientation">vertical</property>
         <property name="halign">center</property>
         <property name="valign">start</property>
+        <property name="spacing">6</property>
         <child>
           <object class="GtkBox" id="fixed_height_box">
             <property name="orientation">vertical</property>
@@ -20,7 +21,7 @@
               <object class="GtkPicture" id="icon">
                 <property name="halign">center</property>
                 <property name="hexpand">True</property>
-                <property name="valign">end</property>
+                <property name="valign">center</property>
                 <property name="vexpand">True</property>
                 <property name="can-shrink">False</property>
               </object>
@@ -31,9 +32,6 @@
           <object class="GtkBox">
             <property name="orientation">vertical</property>
             <property name="valign">start</property>
-            <style>
-              <class name="icon-ui-labels-box"/>
-            </style>
             <child>
               <object class="GtkLabel" id="label">
                 <property name="ellipsize">middle</property>


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