Commit Graph

4 Commits

Author SHA1 Message Date
Benjamin Otte
ac6f18da12 gtk-demo: make the sidebar request proper width
- 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.
2023-06-07 16:00:44 +02:00
Benjamin Otte
ce531ce280 listview: Add GtkListItem::focusable property
This makes the question if a listitem can be focused or not an explicit
decision by application developers.

Previously an item could be focused if it was selectable and no child or
grandchild was focusable - so if you put a label and icon into it, the
item was focusable, but if you put a GtkTreeExpander or a GtkButton into
it, the item wasn't. This needs to be decided explicitly now.

Technically this is an API break, because the previous behavior does not
exist anymore.
But I really don't want to make this a tristate (focusable, not
focusable, automatic), because then binding it to other things gets
hard, and because all the other focusable proeprties are booleans, too,
and working with them gets a lot harder.

Related: #3910
2023-04-01 20:49:40 +02:00
Benjamin Otte
b56b5ed81b gtk-demo: Use GtkInscription in the main list 2022-06-10 04:34:23 +02:00
Timm Bäder
a8d2bb6b22 demo: Use a listview as sidebar 2020-05-30 19:26:45 -04:00