filechooserwidget: Improve grid cell visuals
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 26 Oct 2022 20:48:00 +0000 (17:48 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 13 Dec 2022 17:45:15 +0000 (14:45 -0300)
Use a GtkLabel instead of a GtkInscription to get filenames better
displayed within the available space.

gtk/theme/Default/_common.scss
gtk/ui/gtkfilechooserwidget.ui

index 82c6342a6e94a7d69accfbf99a8093a3d2a4e8da..ccd3d56373361acf065b783999dd9c550a0b5024 100644 (file)
@@ -3591,6 +3591,10 @@ filechooser {
     &:selected:active {
       background-color: gtkalpha($selected_bg_color, .25);
     }
+
+    & filethumbnail image {
+      filter: drop-shadow(0px 1px 1px rgba(0,0,0,0.3));
+    }
   }
 }
 
index 6df28903a54898b1825ce8db7e90b39573194a5a..7d15ccb052b22ee83cb1558a4644aa4baddb3a0a 100644 (file)
               </object>
             </child>
             <child>
-              <object class="GtkInscription">
-                <property name="hexpand">1</property>
-                <property name="yalign">0.0</property>
-                <property name="xalign">0.5</property>
-                <property name="min-chars">12</property>
-                <property name="min-lines">2</property>
-                <binding name="text">
+              <object class="GtkLabel">
+                <property name="lines">3</property>
+                <property name="wrap">True</property>
+                <property name="wrap-mode">word-char</property>
+                <property name="ellipsize">middle</property>
+                <property name="justify">center</property>
+                <attributes>
+                  <attribute name="insert-hyphens" value="false"></attribute>
+                </attributes>
+                <binding name="label">
                   <closure type="gchararray" function="column_view_get_file_display_name">
                     <lookup name="item">GtkListItem</lookup>
                   </closure>