From b39271088c447091fa5e7a8fe961ef40f24cdc3f Mon Sep 17 00:00:00 2001 From: raveit65 Date: Wed, 8 May 2019 12:32:15 +0200 Subject: weather: align Gtk_Box to center fixes https://github.com/mate-desktop/mate-applets/issues/395 --- mateweather/mateweather-applet.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mateweather') 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); -- cgit v1.2.1