diff options
author | Benjamin Otte <otte@redhat.com> | 2020-12-17 22:20:17 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2020-12-24 06:38:45 +0100 |
commit | 2a8f3716438868e3734b70b30ebbcc7942015585 (patch) | |
tree | 4043d5bebcbce36c372d91b56e31c0a6b39213ca /demos/gtk-demo | |
parent | dee863dbb2bb2ed8b5922b2a1f9d5f5dea2dcbcc (diff) | |
download | gtk+-2a8f3716438868e3734b70b30ebbcc7942015585.tar.gz |
gtk-demo: Don't put the search bar in the scroll area
1. That's a bad idea UI wise as you can't see the search after you
scrolled.
2. That's a bad idea code-wise because Listviews need to be put into
a ScrolledWindow or they won't scroll.
Diffstat (limited to 'demos/gtk-demo')
-rw-r--r-- | demos/gtk-demo/main.ui | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/demos/gtk-demo/main.ui b/demos/gtk-demo/main.ui index b4161c9519..b602c9a246 100644 --- a/demos/gtk-demo/main.ui +++ b/demos/gtk-demo/main.ui @@ -53,31 +53,30 @@ <child> <object class="GtkBox"> <child> - <object class="GtkScrolledWindow"> - <style> - <class name="sidebar"/> - </style> - <property name="width-request">120</property> - <property name="hscrollbar-policy">never</property> - <property name="min-content-width">150</property> + <object class="GtkBox"> + <property name="width-request">220</property> + <property name="orientation">vertical</property> <child> - <object class="GtkBox"> - <property name="width-request">220</property> - <property name="orientation">vertical</property> - + <object class="GtkSearchBar" id="searchbar"> + <property name="key-capture-widget">window</property> <child> - <object class="GtkSearchBar" id="searchbar"> - <property name="key-capture-widget">window</property> - <child> - <object class="GtkSearchEntry" id="search-entry"> - <accessibility> - <relation name="controls">listview</relation> - </accessibility> - </object> - </child> + <object class="GtkSearchEntry" id="search-entry"> + <accessibility> + <relation name="controls">listview</relation> + </accessibility> </object> </child> - + </object> + </child> + <child> + <object class="GtkScrolledWindow"> + <style> + <class name="sidebar"/> + </style> + <property name="width-request">120</property> + <property name="hscrollbar-policy">never</property> + <property name="min-content-width">150</property> + <property name="vexpand">1</property> <child> <object class="GtkListView" id="listview"> <style> @@ -94,7 +93,6 @@ </accessibility> </object> </child> - </object> </child> </object> |