gtk-demo: make the sidebar request proper width
authorBenjamin Otte <otte@redhat.com>
Wed, 7 Jun 2023 13:55:59 +0000 (15:55 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 7 Jun 2023 14:00:44 +0000 (16:00 +0200)
- 25 chars sounds about right for the texts we use
- don't use min width so we allow shrinking the widget (large text or
  small mobile devices)
- ellipsize the text instead of clipping it.

demos/gtk-demo/main-listitem.ui

index b3427611ed91b8b1cc0ce344e02fb3034c808c4d..9421536e35c399460c71c2a9865013938e580e85 100644 (file)
@@ -10,6 +10,8 @@
         <property name="child">
           <object class="GtkInscription">
             <property name="hexpand">1</property>
+            <property name="nat-chars">25</property>
+            <property name="text-overflow">ellipsize-end</property>
             <binding name="text">
               <lookup name="title" type="GtkDemo">
                 <lookup name="item">expander</lookup>