summaryrefslogtreecommitdiff
path: root/gtk/gtkflowbox.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/gtkflowbox.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/gtkflowbox.c')
-rw-r--r--gtk/gtkflowbox.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 2d9e9d9e70..5cdd7b8d55 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -2571,6 +2571,7 @@ gtk_flow_box_snapshot (GtkWidget *widget,
cairo_path_t *path;
GtkBorder border;
const GdkRGBA *border_color;
+ GtkCssStyle *style;
if (vertical)
path_from_vertical_line_rects (cr, (GdkRectangle *)lines->data, lines->len);
@@ -2590,7 +2591,8 @@ gtk_flow_box_snapshot (GtkWidget *widget,
cairo_append_path (cr, path);
cairo_path_destroy (path);
- border_color = gtk_css_color_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_COLOR));
+ style = gtk_style_context_lookup_style (context);
+ border_color = style->border->border_top_color ? &style->border->_border_color[GTK_CSS_TOP] : &style->core->_color;
gtk_style_context_get_border (context, &border);
cairo_set_line_width (cr, border.left);