[gtk/wip/otte/lottie: 1/83] gtk-demo: Don't put the search bar in the scroll area
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/lottie: 1/83] gtk-demo: Don't put the search bar in the scroll area
- Date: Sat, 19 Dec 2020 05:42:08 +0000 (UTC)
commit a17042963e05838495a48194d112e9a61a3a81df
Author: Benjamin Otte <otte redhat com>
Date: Thu Dec 17 22:20:17 2020 +0100
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.
demos/gtk-demo/main.ui | 42 ++++++++++++++++++++----------------------
1 file 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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]