forked from AuroraMiddleware/gtk
Rename GTK_CSS_REPEAT_STYLE_NONE to GTK_CSS_REPEAT_STYLE_STRETCH
This is a private type, and the CSS default value is "stretch", which is how we were parsing and printing NONE anyway. With this fix we can use the enum stuff for printing/parsing
This commit is contained in:
parent
2a42fad145
commit
d85aabe1e3
@ -274,7 +274,7 @@ gtk_border_image_render_slice (cairo_t *cr,
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
/* We can't draw center tiles yet */
|
||||
g_assert (hrepeat == GTK_CSS_REPEAT_STYLE_NONE || vrepeat == GTK_CSS_REPEAT_STYLE_NONE);
|
||||
g_assert (hrepeat == GTK_CSS_REPEAT_STYLE_STRETCH || vrepeat == GTK_CSS_REPEAT_STYLE_STRETCH);
|
||||
|
||||
hscale = width / slice_width;
|
||||
vscale = height / slice_height;
|
||||
@ -302,7 +302,7 @@ gtk_border_image_render_slice (cairo_t *cr,
|
||||
width -= 2 * space;
|
||||
}
|
||||
break;
|
||||
case GTK_CSS_REPEAT_STYLE_NONE:
|
||||
case GTK_CSS_REPEAT_STYLE_STRETCH:
|
||||
break;
|
||||
case GTK_CSS_REPEAT_STYLE_ROUND:
|
||||
extend = CAIRO_EXTEND_REPEAT;
|
||||
@ -334,7 +334,7 @@ gtk_border_image_render_slice (cairo_t *cr,
|
||||
height -= 2 * space;
|
||||
}
|
||||
break;
|
||||
case GTK_CSS_REPEAT_STYLE_NONE:
|
||||
case GTK_CSS_REPEAT_STYLE_STRETCH:
|
||||
break;
|
||||
case GTK_CSS_REPEAT_STYLE_ROUND:
|
||||
extend = CAIRO_EXTEND_REPEAT;
|
||||
@ -488,8 +488,8 @@ _gtk_border_image_render (GtkBorderImage *image,
|
||||
vertical_border[v].offset,
|
||||
horizontal_border[h].size,
|
||||
vertical_border[v].size,
|
||||
h == 1 ? image->repeat.hrepeat : GTK_CSS_REPEAT_STYLE_NONE,
|
||||
v == 1 ? image->repeat.vrepeat : GTK_CSS_REPEAT_STYLE_NONE);
|
||||
h == 1 ? image->repeat.hrepeat : GTK_CSS_REPEAT_STYLE_STRETCH,
|
||||
v == 1 ? image->repeat.vrepeat : GTK_CSS_REPEAT_STYLE_STRETCH);
|
||||
|
||||
cairo_surface_destroy (slice);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ typedef enum {
|
||||
} GtkCssBackgroundRepeatStyle;
|
||||
|
||||
typedef enum {
|
||||
GTK_CSS_REPEAT_STYLE_NONE,
|
||||
GTK_CSS_REPEAT_STYLE_STRETCH,
|
||||
GTK_CSS_REPEAT_STYLE_REPEAT,
|
||||
GTK_CSS_REPEAT_STYLE_ROUND,
|
||||
GTK_CSS_REPEAT_STYLE_SPACE
|
||||
|
@ -1241,7 +1241,7 @@ border_image_repeat_value_parse (GtkCssParser *parser,
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
if (_gtk_css_parser_try (parser, "stretch", TRUE))
|
||||
styles[i] = GTK_CSS_REPEAT_STYLE_NONE;
|
||||
styles[i] = GTK_CSS_REPEAT_STYLE_STRETCH;
|
||||
else if (_gtk_css_parser_try (parser, "repeat", TRUE))
|
||||
styles[i] = GTK_CSS_REPEAT_STYLE_REPEAT;
|
||||
else if (_gtk_css_parser_try (parser, "round", TRUE))
|
||||
@ -1250,7 +1250,7 @@ border_image_repeat_value_parse (GtkCssParser *parser,
|
||||
styles[i] = GTK_CSS_REPEAT_STYLE_SPACE;
|
||||
else if (i == 0)
|
||||
{
|
||||
styles[1] = styles[0] = GTK_CSS_REPEAT_STYLE_NONE;
|
||||
styles[1] = styles[0] = GTK_CSS_REPEAT_STYLE_STRETCH;
|
||||
break;
|
||||
}
|
||||
else
|
||||
@ -1270,7 +1270,7 @@ border_image_repeat_style_to_string (GtkCssBorderRepeatStyle repeat)
|
||||
{
|
||||
switch (repeat)
|
||||
{
|
||||
case GTK_CSS_REPEAT_STYLE_NONE:
|
||||
case GTK_CSS_REPEAT_STYLE_STRETCH:
|
||||
return "stretch";
|
||||
case GTK_CSS_REPEAT_STYLE_REPEAT:
|
||||
return "repeat";
|
||||
|
Loading…
Reference in New Issue
Block a user