borderimage: Use style context as argument

... not the theming engine.
This commit is contained in:
Benjamin Otte 2014-08-16 19:00:03 +02:00
parent 04bf3d1e1f
commit 1a143cd272
3 changed files with 7 additions and 8 deletions

View File

@ -39,15 +39,15 @@
gboolean
_gtk_border_image_init (GtkBorderImage *image,
GtkThemingEngine *engine)
GtkStyleContext *context)
{
image->source = _gtk_css_image_value_get_image (_gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE));
image->source = _gtk_css_image_value_get_image (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE));
if (image->source == NULL)
return FALSE;
image->slice = _gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE);
image->width = _gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH);
image->repeat = _gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT);
image->slice = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE);
image->width = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH);
image->repeat = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT);
return TRUE;
}

View File

@ -25,7 +25,6 @@
#include "gtkborder.h"
#include "gtkcssimageprivate.h"
#include "gtkcssvalueprivate.h"
#include "gtkthemingengine.h"
G_BEGIN_DECLS
@ -40,7 +39,7 @@ struct _GtkBorderImage {
};
gboolean _gtk_border_image_init (GtkBorderImage *image,
GtkThemingEngine *engine);
GtkStyleContext *context);
void _gtk_border_image_render (GtkBorderImage *image,
const double border_width[4],

View File

@ -1766,7 +1766,7 @@ render_frame_internal (GtkThemingEngine *engine,
gtk_theming_engine_hide_border_sides (border_width, border_style, hidden_side);
if (_gtk_border_image_init (&border_image, engine))
if (_gtk_border_image_init (&border_image, engine->priv->context))
_gtk_border_image_render (&border_image, border_width, cr, x, y, width, height);
else
{