summaryrefslogtreecommitdiff
path: root/sensors-applet
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-03-18 14:47:29 +0100
committerraveit65 <[email protected]>2017-03-18 14:47:29 +0100
commit6dd3a48122004ac8bec2264ac513a6e2b7b760a1 (patch)
treeaf8dce99a767cd91796a267bd3a477452785632c /sensors-applet
parent0ee426a0d04e4e04beec9be0eeead5239cfba4ab (diff)
downloadmate-sensors-applet-6dd3a48122004ac8bec2264ac513a6e2b7b760a1.tar.bz2
mate-sensors-applet-6dd3a48122004ac8bec2264ac513a6e2b7b760a1.tar.xz
use GTK_ALIGN_CENTER for the sensor_applet grid
fixes https://github.com/mate-desktop/mate-sensors-applet/issues/41
Diffstat (limited to 'sensors-applet')
-rw-r--r--sensors-applet/sensors-applet.c4
1 files changed, 4 insertions, 0 deletions
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