[bijiben] Preferences dialog : Move stackswitcher to headerbar
- From: Pierre-Yves Luyten <pyluyten src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] Preferences dialog : Move stackswitcher to headerbar
- Date: Wed, 26 Nov 2014 23:00:08 +0000 (UTC)
commit a55df39046a4574435159304dd85f1477181dbfe
Author: Trinh Anh Ngoc <atw1990 gmail com>
Date: Wed Nov 26 23:59:02 2014 +0100
Preferences dialog : Move stackswitcher to headerbar
src/bjb-settings-dialog.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/bjb-settings-dialog.c b/src/bjb-settings-dialog.c
index c2fc808..90a8cdd 100644
--- a/src/bjb-settings-dialog.c
+++ b/src/bjb-settings-dialog.c
@@ -473,9 +473,11 @@ bjb_settings_dialog_constructed (GObject *object)
gtk_widget_set_vexpand (GTK_WIDGET (priv->stack), TRUE);
priv->switcher = GTK_STACK_SWITCHER (gtk_stack_switcher_new ());
+ gtk_header_bar_set_custom_title (GTK_HEADER_BAR (gtk_dialog_get_header_bar (dialog)), GTK_WIDGET
(priv->switcher));
+ gtk_widget_show (GTK_WIDGET (priv->switcher));
+
hbox = gtk_grid_new ();
gtk_widget_set_vexpand (hbox, TRUE);
- gtk_grid_attach (GTK_GRID (hbox), GTK_WIDGET (priv->switcher), 1, 1, 1, 1);
gtk_widget_set_halign (hbox, GTK_ALIGN_CENTER);
gtk_widget_set_valign (hbox, GTK_ALIGN_CENTER);
gtk_stack_switcher_set_stack (priv->switcher, priv->stack);
@@ -483,7 +485,6 @@ bjb_settings_dialog_constructed (GObject *object)
grid = gtk_grid_new ();
gtk_container_add (GTK_CONTAINER (area),grid);
gtk_grid_attach (GTK_GRID (grid), hbox, 1, 1, 1, 1);
- gtk_widget_set_valign (GTK_WIDGET (priv->switcher), GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), GTK_WIDGET (priv->stack), 1, 2, 1, 1);
gtk_widget_set_valign (GTK_WIDGET (priv->stack), GTK_ALIGN_CENTER);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]