diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c index df6d74daec..f6ec2f1111 100644 --- a/gtk/gtkgrid.c +++ b/gtk/gtkgrid.c @@ -163,11 +163,11 @@ gtk_grid_get_property (GObject *object, break; case PROP_ROW_SPACING: - g_value_set_int (value, ROWS (priv)->spacing); + g_value_set_int (value, COLUMNS (priv)->spacing); break; case PROP_COLUMN_SPACING: - g_value_set_int (value, COLUMNS (priv)->spacing); + g_value_set_int (value, ROWS (priv)->spacing); break; case PROP_ROW_HOMOGENEOUS: @@ -1821,9 +1821,9 @@ gtk_grid_set_row_spacing (GtkGrid *grid, priv = grid->priv; - if (ROWS (priv)->spacing != spacing) + if (COLUMNS (priv)->spacing != spacing) { - ROWS (priv)->spacing = spacing; + COLUMNS (priv)->spacing = spacing; if (gtk_widget_get_visible (GTK_WIDGET (grid))) gtk_widget_queue_resize (GTK_WIDGET (grid)); @@ -1848,7 +1848,7 @@ gtk_grid_get_row_spacing (GtkGrid *grid) priv = grid->priv; - return ROWS (priv)->spacing; + return COLUMNS (priv)->spacing; } /** @@ -1868,9 +1868,9 @@ gtk_grid_set_column_spacing (GtkGrid *grid, priv = grid->priv; - if (COLUMNS (priv)->spacing != spacing) + if (ROWS (priv)->spacing != spacing) { - COLUMNS (priv)->spacing = spacing; + ROWS (priv)->spacing = spacing; if (gtk_widget_get_visible (GTK_WIDGET (grid))) gtk_widget_queue_resize (GTK_WIDGET (grid)); @@ -1896,5 +1896,5 @@ gtk_grid_get_column_spacing (GtkGrid *grid) priv = grid->priv; - return COLUMNS (priv)->spacing; + return ROWS (priv)->spacing; } diff --git a/tests/reftests/grid-spacing1.ui b/tests/reftests/grid-spacing1.ui index a8a330ada1..eda8526a04 100644 --- a/tests/reftests/grid-spacing1.ui +++ b/tests/reftests/grid-spacing1.ui @@ -13,7 +13,7 @@ True False - 20 + 20 True diff --git a/tests/reftests/grid-spacing2.ui b/tests/reftests/grid-spacing2.ui index 0e9c82f056..fe28a55913 100644 --- a/tests/reftests/grid-spacing2.ui +++ b/tests/reftests/grid-spacing2.ui @@ -13,7 +13,7 @@ True False - 20 + 20 True