diff options
author | Benjamin Otte <otte@redhat.com> | 2023-03-26 00:50:45 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2023-04-01 20:49:40 +0200 |
commit | ce531ce280e6f34c223b976d54cb7a354a22e62f (patch) | |
tree | ce4a7e18cbe73c21ca8d53e8eca10de7a73ec0c5 /demos/gtk-demo | |
parent | eb0541c9d18a165b4b9e6bb2c68cd72d9fc2f4d2 (diff) | |
download | gtk+-ce531ce280e6f34c223b976d54cb7a354a22e62f.tar.gz |
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
Diffstat (limited to 'demos/gtk-demo')
-rw-r--r-- | demos/gtk-demo/main-listitem.ui | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/demos/gtk-demo/main-listitem.ui b/demos/gtk-demo/main-listitem.ui index aab22e3e20..b3427611ed 100644 --- a/demos/gtk-demo/main-listitem.ui +++ b/demos/gtk-demo/main-listitem.ui @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <template class="GtkListItem"> + <property name="focusable">0</property> <property name="child"> <object class="GtkTreeExpander" id="expander"> <binding name="list-row"> |