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:51:46 +0200
commitb39271088c447091fa5e7a8fe961ef40f24cdc3f (patch)
treed273e8b1ab523541685717a60364fc1e287a2363 /mateweather
parent6b57a5b6c4ed159be8567d71ce8e302bf04b495f (diff)
downloadmate-applets-b39271088c447091fa5e7a8fe961ef40f24cdc3f.tar.bz2
mate-applets-b39271088c447091fa5e7a8fe961ef40f24cdc3f.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);