[gnome-builder/wip/project-selector] project-selector: work around 1px gdkwindow height restriction
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/project-selector] project-selector: work around 1px gdkwindow height restriction
- Date: Wed, 1 Apr 2015 22:03:57 +0000 (UTC)
commit 7e51884b7dac1ecce51d342bb24a887da2417085
Author: Christian Hergert <christian hergert me>
Date: Wed Apr 1 15:03:52 2015 -0700
project-selector: work around 1px gdkwindow height restriction
data/ui/gb-project-window.ui | 13 ++++++++++---
src/workbench/gb-project-window.c | 4 +++-
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/data/ui/gb-project-window.ui b/data/ui/gb-project-window.ui
index 68089e7..a28abcc 100644
--- a/data/ui/gb-project-window.ui
+++ b/data/ui/gb-project-window.ui
@@ -85,12 +85,19 @@
<property name="orientation">vertical</property>
<property name="visible">true</property>
<child>
- <object class="GtkSearchBar" id="search_bar">
+ <object class="GtkRevealer" id="search_revealer">
<property name="visible">true</property>
+ <property name="reveal-child">false</property>
<child>
- <object class="GtkSearchEntry" id="search_entry">
- <property name="width-chars">40</property>
+ <object class="GtkSearchBar" id="search_bar">
+ <property name="search-mode-enabled">true</property>
<property name="visible">true</property>
+ <child>
+ <object class="GtkSearchEntry" id="search_entry">
+ <property name="width-chars">40</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
</object>
</child>
</object>
diff --git a/src/workbench/gb-project-window.c b/src/workbench/gb-project-window.c
index 2a3c5bb..b91840a 100644
--- a/src/workbench/gb-project-window.c
+++ b/src/workbench/gb-project-window.c
@@ -39,6 +39,7 @@ struct _GbProjectWindow
GtkListBox *listbox;
GtkSearchBar *search_bar;
GtkToggleButton *search_button;
+ GtkRevealer *search_revealer;
GtkToggleButton *select_button;
};
@@ -396,7 +397,7 @@ gb_project_window_constructed (GObject *object)
G_CONNECT_SWAPPED);
g_object_bind_property (self->search_button, "active",
- self->search_bar, "search-mode-enabled",
+ self->search_revealer, "reveal-child",
G_BINDING_SYNC_CREATE);
ide_project_miner_mine_async (miner,
@@ -437,6 +438,7 @@ gb_project_window_class_init (GbProjectWindowClass *klass)
GB_WIDGET_CLASS_BIND (klass, GbProjectWindow, listbox);
GB_WIDGET_CLASS_BIND (klass, GbProjectWindow, search_bar);
GB_WIDGET_CLASS_BIND (klass, GbProjectWindow, search_button);
+ GB_WIDGET_CLASS_BIND (klass, GbProjectWindow, search_revealer);
GB_WIDGET_CLASS_BIND (klass, GbProjectWindow, select_button);
g_type_ensure (GB_TYPE_SCROLLED_WINDOW);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]