[gnome-builder/wip/chergert/layout] devhelp: align search icon with cell renderer icons
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/layout] devhelp: align search icon with cell renderer icons
- Date: Mon, 3 Jul 2017 03:49:23 +0000 (UTC)
commit bdd546e292f0fde3018dd1bf784c4949b8d9ef3b
Author: Christian Hergert <chergert redhat com>
Date: Sun Jul 2 20:49:02 2017 -0700
devhelp: align search icon with cell renderer icons
plugins/devhelp/gbp-devhelp-menu-button.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/plugins/devhelp/gbp-devhelp-menu-button.c b/plugins/devhelp/gbp-devhelp-menu-button.c
index 168161b..b8cc3d2 100644
--- a/plugins/devhelp/gbp-devhelp-menu-button.c
+++ b/plugins/devhelp/gbp-devhelp-menu-button.c
@@ -144,6 +144,7 @@ monkey_patch_devhelp (GbpDevhelpMenuButton *self)
GtkCellRenderer *cell;
GtkTreeModel *model;
GType column_type;
+ GtkSearchEntry *search;
g_assert (GBP_IS_DEVHELP_MENU_BUTTON (self));
@@ -187,6 +188,19 @@ monkey_patch_devhelp (GbpDevhelpMenuButton *self)
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (column), cell,
gbp_devhelp_menu_button_pixbuf_data_func,
NULL, NULL);
+
+ /*
+ * Now find the GtkSearchEntry and adjust the margins on it to match
+ * our style and align the search icon with our icon cell renderer.
+ */
+ search = dzl_gtk_widget_find_child_typed (GTK_WIDGET (self->sidebar), GTK_TYPE_SEARCH_ENTRY);
+ if (search != NULL)
+ g_object_set (search,
+ "margin-top", 0,
+ "margin-end", 0,
+ "margin-start", 0,
+ "margin-bottom", 6,
+ NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]