diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-09-13 17:04:19 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-09-14 00:08:36 -0400 |
commit | 5bbe811090d11840bbd65f46b6f5100b3079ac97 (patch) | |
tree | 317ac1036a5efce27afe696b5ddc35a023edb7b8 /gtk/gtkboxlayout.c | |
parent | 952f85c12de13e978294af58f26694eddb3a1ee0 (diff) | |
download | gtk+-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/gtkboxlayout.c')
-rw-r--r-- | gtk/gtkboxlayout.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/gtk/gtkboxlayout.c b/gtk/gtkboxlayout.c index 275e0371c9..2fbaa973aa 100644 --- a/gtk/gtkboxlayout.c +++ b/gtk/gtkboxlayout.c @@ -188,16 +188,8 @@ get_spacing (GtkBoxLayout *self, GtkCssNode *node) { GtkCssStyle *style = gtk_css_node_get_style (node); - GtkCssValue *border_spacing; - int css_spacing; - border_spacing = style->size->border_spacing; - if (self->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->spacing; + return style->size->_border_spacing[self->orientation] + self->spacing; } static void |