[gnome-applets/wip/segeiger/window-picker-in-process] windowpicker/applet.c: Remove unnecessary [hv]expand calls and set [hv]alignment based on orientatio
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/segeiger/window-picker-in-process] windowpicker/applet.c: Remove unnecessary [hv]expand calls and set [hv]alignment based on orientatio
- Date: Sun, 12 Jul 2015 13:32:58 +0000 (UTC)
commit d597c761c18bf60ed81207211eaa7c59c8726973
Author: Sebastian Geiger <sbastig gmx net>
Date: Sun Jul 12 15:31:26 2015 +0200
windowpicker/applet.c: Remove unnecessary [hv]expand calls and set [hv]alignment based on orientation
windowpicker/src/applet.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/windowpicker/src/applet.c b/windowpicker/src/applet.c
index 5580bb6..a9b25e8 100644
--- a/windowpicker/src/applet.c
+++ b/windowpicker/src/applet.c
@@ -152,18 +152,24 @@ load_window_picker (PanelApplet *applet) {
= panel_applet_settings_new(applet, SETTINGS_SCHEMA);
GtkWidget *outer_box = priv->outer_box = gtk_box_new (panel_applet_get_gtk_orientation (applet), 0);
- gtk_widget_set_halign (outer_box, GTK_ALIGN_START);
+ if (panel_applet_get_gtk_orientation (applet) == GTK_ORIENTATION_HORIZONTAL) {
+ gtk_widget_set_halign (outer_box, GTK_ALIGN_START);
+ } else {
+ gtk_widget_set_valign (outer_box, GTK_ALIGN_START);
+ }
gtk_container_add (GTK_CONTAINER (applet), outer_box);
gtk_container_set_border_width (GTK_CONTAINER (applet), 0);
gtk_container_set_border_width (GTK_CONTAINER (outer_box), 0);
priv->tasks = task_list_new (windowPickerApplet);
- gtk_widget_set_vexpand (priv->tasks, TRUE);
- gtk_widget_set_halign (priv->tasks, GTK_ALIGN_START);
+ if (panel_applet_get_gtk_orientation (applet) == GTK_ORIENTATION_HORIZONTAL) {
+ gtk_widget_set_halign (priv->tasks, GTK_ALIGN_START);
+ } else {
+ gtk_widget_set_valign (priv->tasks, GTK_ALIGN_START);
+ }
gtk_box_pack_start (GTK_BOX (outer_box), priv->tasks, TRUE, TRUE, 0);
priv->title = task_title_new (windowPickerApplet);
- gtk_widget_set_hexpand (priv->title, TRUE);
gtk_box_pack_start (GTK_BOX (outer_box), priv->title, TRUE, TRUE, 0);
priv->show_all_windows = g_settings_get_boolean (settings, KEY_SHOW_ALL_WINDOWS);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]