diff options
author | Benjamin Otte <otte@redhat.com> | 2016-12-18 17:52:47 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-12-20 18:01:11 +0100 |
commit | 9af468cdec1c8b4dc603ff36c286288b2c85eb9e (patch) | |
tree | 11a1ae3506edd1b2114ea771cd1cbf61f7882620 /gtk | |
parent | a9809e5d30fbf4d5e3b555b5489d75102d5d30d0 (diff) | |
download | gtk+-9af468cdec1c8b4dc603ff36c286288b2c85eb9e.tar.gz |
gtk: Remove unused argument from function
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkcssgadget.c | 1 | ||||
-rw-r--r-- | gtk/gtkrender.c | 4 | ||||
-rw-r--r-- | gtk/gtkrenderborder.c | 29 | ||||
-rw-r--r-- | gtk/gtkrenderborderprivate.h | 1 |
4 files changed, 6 insertions, 29 deletions
diff --git a/gtk/gtkcssgadget.c b/gtk/gtkcssgadget.c index ce6e8d7709..063d4f3b79 100644 --- a/gtk/gtkcssgadget.c +++ b/gtk/gtkcssgadget.c @@ -902,7 +902,6 @@ gtk_css_gadget_draw (GtkCssGadget *gadget, y + margin.top, width - margin.left - margin.right, height - margin.top - margin.bottom, - 0, gtk_css_node_get_junction_sides (priv->node)); contents_x = x + margin.left + border.left + padding.left; diff --git a/gtk/gtkrender.c b/gtk/gtkrender.c index a0c086bb97..1c279f693f 100644 --- a/gtk/gtkrender.c +++ b/gtk/gtkrender.c @@ -332,7 +332,6 @@ gtk_render_frame (GtkStyleContext *context, gtk_css_style_render_border (gtk_style_context_lookup_style (context), cr, x, y, width, height, - 0, gtk_style_context_get_junction_sides (context)); } @@ -595,7 +594,6 @@ gtk_do_render_slider (GtkStyleContext *context, gtk_css_style_render_border (style, cr, x, y, width, height, - 0, junction); } @@ -732,7 +730,7 @@ gtk_css_style_render_frame_gap (GtkCssStyle *style, gtk_css_style_render_border (style, cr, x, y, width, height, - 0, junction); + junction); cairo_restore (cr); } diff --git a/gtk/gtkrenderborder.c b/gtk/gtkrenderborder.c index 9696c6cc69..5a17516499 100644 --- a/gtk/gtkrenderborder.c +++ b/gtk/gtkrenderborder.c @@ -338,20 +338,6 @@ gtk_border_image_render (GtkBorderImage *image, } static void -hide_border_sides (double border[4], - GtkBorderStyle border_style[4], - guint hidden_side) -{ - guint i; - - for (i = 0; i < 4; i++) - { - if (hidden_side & (1 << i)) - border[i] = 0; - } -} - -static void render_frame_fill (cairo_t *cr, GskRoundedRect *border_box, const double border_width[4], @@ -569,10 +555,10 @@ static void render_border (cairo_t *cr, GskRoundedRect *border_box, const double border_width[4], - guint hidden_side, GdkRGBA colors[4], GtkBorderStyle border_style[4]) { + guint hidden_side = 0; guint i, j; cairo_save (cr); @@ -712,7 +698,6 @@ gtk_css_style_render_border (GtkCssStyle *style, gdouble y, gdouble width, gdouble height, - guint hidden_side, GtkJunctionSides junction) { GtkBorderImage border_image; @@ -745,8 +730,6 @@ gtk_css_style_render_border (GtkCssStyle *style, border_style[2] = _gtk_css_border_style_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_STYLE)); border_style[3] = _gtk_css_border_style_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_LEFT_STYLE)); - hide_border_sides (border_width, border_style, hidden_side); - colors[0] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_TOP_COLOR)); colors[1] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_RIGHT_COLOR)); colors[2] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_COLOR)); @@ -755,7 +738,7 @@ gtk_css_style_render_border (GtkCssStyle *style, _gtk_rounded_box_init_rect (&border_box, x, y, width, height); _gtk_rounded_box_apply_border_radius_for_style (&border_box, style, junction); - render_border (cr, &border_box, border_width, hidden_side, colors, border_style); + render_border (cr, &border_box, border_width, colors, border_style); } } @@ -808,8 +791,6 @@ gtk_css_style_snapshot_border (GtkCssStyle *style, border_style[2] = _gtk_css_border_style_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_STYLE)); border_style[3] = _gtk_css_border_style_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_LEFT_STYLE)); - hide_border_sides (border_width, border_style, 0); - colors[0] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_TOP_COLOR)); colors[1] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_RIGHT_COLOR)); colors[2] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_COLOR)); @@ -818,7 +799,7 @@ gtk_css_style_snapshot_border (GtkCssStyle *style, _gtk_rounded_box_init_rect (&border_box, 0, 0, width, height); _gtk_rounded_box_apply_border_radius_for_style (&border_box, style, junction); - render_border (cr, &border_box, border_width, 0, colors, border_style); + render_border (cr, &border_box, border_width, colors, border_style); cairo_destroy (cr); } @@ -917,7 +898,7 @@ gtk_css_style_render_outline (GtkCssStyle *style, _gtk_rounded_box_init_rect (&border_box, rect.x, rect.y, rect.width, rect.height); _gtk_rounded_box_apply_outline_radius_for_style (&border_box, style, GTK_JUNCTION_NONE); - render_border (cr, &border_box, border_width, 0, colors, border_style); + render_border (cr, &border_box, border_width, colors, border_style); } } @@ -953,7 +934,7 @@ gtk_css_style_snapshot_outline (GtkCssStyle *style, &GRAPHENE_RECT_INIT (rect.x, rect.y, rect.width, rect.height), "Outline"); - render_border (cr, &border_box, border_width, 0, colors, border_style); + render_border (cr, &border_box, border_width, colors, border_style); cairo_destroy (cr); } diff --git a/gtk/gtkrenderborderprivate.h b/gtk/gtkrenderborderprivate.h index 214560b35a..f89cdcb600 100644 --- a/gtk/gtkrenderborderprivate.h +++ b/gtk/gtkrenderborderprivate.h @@ -36,7 +36,6 @@ void gtk_css_style_render_border (GtkCssStyle gdouble y, gdouble width, gdouble height, - guint hidden_side, GtkJunctionSides junction); gboolean gtk_css_style_render_border_get_clip (GtkCssStyle *style, gdouble x, |