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.
This commit is contained in:
Benjamin Otte 2020-12-17 22:20:17 +01:00
parent dee863dbb2
commit 2a8f371643

View File

@ -52,19 +52,10 @@
</child>
<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>
<child>
<object class="GtkBox">
<property name="width-request">220</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkSearchBar" id="searchbar">
<property name="key-capture-widget">window</property>
@ -77,7 +68,15 @@
</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>