summaryrefslogtreecommitdiff
path: root/gtk/gtkgridlayout.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-09-13 17:04:19 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-09-14 00:08:36 -0400
commit5bbe811090d11840bbd65f46b6f5100b3079ac97 (patch)
tree317ac1036a5efce27afe696b5ddc35a023edb7b8 /gtk/gtkgridlayout.c
parent952f85c12de13e978294af58f26694eddb3a1ee0 (diff)
downloadgtk+-wip/css-value-unboxing.tar.gz
wip: Unbox css valueswip/css-value-unboxing
Keep css values unboxed in the values structs, for faster access to these values, where it makes sense.
Diffstat (limited to 'gtk/gtkgridlayout.c')
-rw-r--r--gtk/gtkgridlayout.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/gtk/gtkgridlayout.c b/gtk/gtkgridlayout.c
index d449f43da1..4da0a47787 100644
--- a/gtk/gtkgridlayout.c
+++ b/gtk/gtkgridlayout.c
@@ -464,17 +464,8 @@ get_spacing (GtkGridLayout *self,
{
GtkCssNode *node = gtk_widget_get_css_node (widget);
GtkCssStyle *style = gtk_css_node_get_style (node);
- GtkCssValue *border_spacing;
- int css_spacing;
- border_spacing = style->size->border_spacing;
-
- if (orientation == GTK_ORIENTATION_HORIZONTAL)
- css_spacing = _gtk_css_position_value_get_x (border_spacing, 100);
- else
- css_spacing = _gtk_css_position_value_get_y (border_spacing, 100);
-
- return css_spacing + self->linedata[orientation].spacing;
+ return style->size->_border_spacing[orientation] + self->linedata[orientation].spacing;
}
/* Calculates the min and max numbers for both orientations. */