diff options
author | Timm Bäder <mail@baedert.org> | 2018-08-20 07:52:58 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2018-08-25 08:05:57 +0200 |
commit | bf222a9292c3756530b35dc5a7709f838d5284de (patch) | |
tree | 022731462a57612759919d5d25de79968a5323d7 /gtk/gtkrenderborder.c | |
parent | 96e465b6d9389ebbfecbb851a9291e308f156bd3 (diff) | |
download | gtk+-bf222a9292c3756530b35dc5a7709f838d5284de.tar.gz |
renderborder: Pull some locals into the closest scope
Especially the bounds graphene_rect_t, which is unused in the
non-border-image case.
Diffstat (limited to 'gtk/gtkrenderborder.c')
-rw-r--r-- | gtk/gtkrenderborder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkrenderborder.c b/gtk/gtkrenderborder.c index f809e0e215..3426ebfca3 100644 --- a/gtk/gtkrenderborder.c +++ b/gtk/gtkrenderborder.c @@ -668,20 +668,20 @@ gtk_css_style_snapshot_border (GtkCssStyle *style, { GtkBorderImage border_image; float border_width[4]; - graphene_rect_t bounds; - cairo_t *cr; border_width[0] = _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_TOP_WIDTH), 100); border_width[1] = _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH), 100); border_width[2] = _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH), 100); border_width[3] = _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH), 100); - graphene_rect_init (&bounds, 0, 0, width, height); - if (gtk_border_image_init (&border_image, style)) { + cairo_t *cr; + graphene_rect_t bounds; double double_width[4] = { border_width[0], border_width[1], border_width[2], border_width[3] }; + graphene_rect_init (&bounds, 0, 0, width, height); + gtk_snapshot_push_debug (snapshot, "CSS border image"); cr = gtk_snapshot_append_cairo (snapshot, &bounds); |