From 6dd3a48122004ac8bec2264ac513a6e2b7b760a1 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sat, 18 Mar 2017 14:47:29 +0100 Subject: use GTK_ALIGN_CENTER for the sensor_applet grid fixes https://github.com/mate-desktop/mate-sensors-applet/issues/41 --- sensors-applet/sensors-applet.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sensors-applet') diff --git a/sensors-applet/sensors-applet.c b/sensors-applet/sensors-applet.c index a400d94..be93883 100644 --- a/sensors-applet/sensors-applet.c +++ b/sensors-applet/sensors-applet.c @@ -479,6 +479,8 @@ static void sensors_applet_pack_display(SensorsApplet *sensors_applet) { sensors_applet->grid = gtk_grid_new(); gtk_grid_set_column_spacing(GTK_GRID(sensors_applet->grid), COLUMN_SPACING); gtk_grid_set_row_spacing(GTK_GRID(sensors_applet->grid), ROW_SPACING); + gtk_widget_set_halign(sensors_applet->grid, GTK_ALIGN_CENTER); + gtk_widget_set_valign(sensors_applet->grid, GTK_ALIGN_CENTER); /* add grid to applet */ gtk_container_add(GTK_CONTAINER(sensors_applet->applet), sensors_applet->grid); } else { @@ -683,6 +685,8 @@ static void sensors_applet_pack_display(SensorsApplet *sensors_applet) { sensors_applet->grid = gtk_grid_new(); gtk_grid_set_column_spacing(GTK_GRID(sensors_applet->grid), COLUMN_SPACING); gtk_grid_set_row_spacing(GTK_GRID(sensors_applet->grid), ROW_SPACING); + gtk_widget_set_halign(sensors_applet->grid, GTK_ALIGN_CENTER); + gtk_widget_set_valign(sensors_applet->grid, GTK_ALIGN_CENTER); gtk_container_add(GTK_CONTAINER(sensors_applet->applet), sensors_applet->grid); } else { /* remove all children if grid already exists so we can start -- cgit v1.2.1