summaryrefslogtreecommitdiff
path: root/mateweather
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2019-05-08 12:32:15 +0200
committerraveit65 <[email protected]>2019-05-09 11:45:01 +0200
commitf5d5328b77a1eaa6fe42fb038b4a16a11c5fe6a8 (patch)
treeac5cd20d8d0ac129c00f54280827e532f5a78edf /mateweather
parent736ba510c9d5c55ca5a3a59693ce25fba010ad03 (diff)
downloadmate-applets-f5d5328b77a1eaa6fe42fb038b4a16a11c5fe6a8.tar.bz2
mate-applets-f5d5328b77a1eaa6fe42fb038b4a16a11c5fe6a8.tar.xz
weather: align Gtk_Box to center
fixes https://github.com/mate-desktop/mate-applets/issues/395
Diffstat (limited to 'mateweather')
-rw-r--r--mateweather/mateweather-applet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mateweather/mateweather-applet.c b/mateweather/mateweather-applet.c
index fbbbaebd..92332224 100644
--- a/mateweather/mateweather-applet.c
+++ b/mateweather/mateweather-applet.c
@@ -184,6 +184,12 @@ static void place_widgets (MateWeatherApplet *gw_applet)
else
gw_applet->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ /* better for vertical panels */
+ if (horizontal)
+ gtk_widget_set_valign (gw_applet->box, GTK_ALIGN_CENTER);
+ else
+ gtk_widget_set_halign (gw_applet->box, GTK_ALIGN_CENTER);
+
/* Rebuild the applet it's visual area */
gtk_container_add (GTK_CONTAINER (gw_applet->applet), gw_applet->box);
gtk_box_pack_start (GTK_BOX (gw_applet->box), gw_applet->image, TRUE, TRUE, 0);