gtk: Remove unused argument from function

This commit is contained in:
Benjamin Otte 2016-12-18 17:52:47 +01:00
parent a9809e5d30
commit 9af468cdec
4 changed files with 6 additions and 29 deletions

View File

@ -902,7 +902,6 @@ gtk_css_gadget_draw (GtkCssGadget *gadget,
y + margin.top, y + margin.top,
width - margin.left - margin.right, width - margin.left - margin.right,
height - margin.top - margin.bottom, height - margin.top - margin.bottom,
0,
gtk_css_node_get_junction_sides (priv->node)); gtk_css_node_get_junction_sides (priv->node));
contents_x = x + margin.left + border.left + padding.left; contents_x = x + margin.left + border.left + padding.left;

View File

@ -332,7 +332,6 @@ gtk_render_frame (GtkStyleContext *context,
gtk_css_style_render_border (gtk_style_context_lookup_style (context), gtk_css_style_render_border (gtk_style_context_lookup_style (context),
cr, cr,
x, y, width, height, x, y, width, height,
0,
gtk_style_context_get_junction_sides (context)); gtk_style_context_get_junction_sides (context));
} }
@ -595,7 +594,6 @@ gtk_do_render_slider (GtkStyleContext *context,
gtk_css_style_render_border (style, gtk_css_style_render_border (style,
cr, cr,
x, y, width, height, x, y, width, height,
0,
junction); junction);
} }
@ -732,7 +730,7 @@ gtk_css_style_render_frame_gap (GtkCssStyle *style,
gtk_css_style_render_border (style, cr, gtk_css_style_render_border (style, cr,
x, y, width, height, x, y, width, height,
0, junction); junction);
cairo_restore (cr); cairo_restore (cr);
} }

View File

@ -337,20 +337,6 @@ gtk_border_image_render (GtkBorderImage *image,
cairo_surface_destroy (surface); cairo_surface_destroy (surface);
} }
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 static void
render_frame_fill (cairo_t *cr, render_frame_fill (cairo_t *cr,
GskRoundedRect *border_box, GskRoundedRect *border_box,
@ -569,10 +555,10 @@ static void
render_border (cairo_t *cr, render_border (cairo_t *cr,
GskRoundedRect *border_box, GskRoundedRect *border_box,
const double border_width[4], const double border_width[4],
guint hidden_side,
GdkRGBA colors[4], GdkRGBA colors[4],
GtkBorderStyle border_style[4]) GtkBorderStyle border_style[4])
{ {
guint hidden_side = 0;
guint i, j; guint i, j;
cairo_save (cr); cairo_save (cr);
@ -712,7 +698,6 @@ gtk_css_style_render_border (GtkCssStyle *style,
gdouble y, gdouble y,
gdouble width, gdouble width,
gdouble height, gdouble height,
guint hidden_side,
GtkJunctionSides junction) GtkJunctionSides junction)
{ {
GtkBorderImage border_image; 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[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)); 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[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[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)); 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_init_rect (&border_box, x, y, width, height);
_gtk_rounded_box_apply_border_radius_for_style (&border_box, style, junction); _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[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)); 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[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[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)); 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_init_rect (&border_box, 0, 0, width, height);
_gtk_rounded_box_apply_border_radius_for_style (&border_box, style, junction); _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); 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_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); _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), &GRAPHENE_RECT_INIT (rect.x, rect.y, rect.width, rect.height),
"Outline"); "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); cairo_destroy (cr);
} }

View File

@ -36,7 +36,6 @@ void gtk_css_style_render_border (GtkCssStyle
gdouble y, gdouble y,
gdouble width, gdouble width,
gdouble height, gdouble height,
guint hidden_side,
GtkJunctionSides junction); GtkJunctionSides junction);
gboolean gtk_css_style_render_border_get_clip (GtkCssStyle *style, gboolean gtk_css_style_render_border_get_clip (GtkCssStyle *style,
gdouble x, gdouble x,