[gtk+/win32-theme: 4/6] Actually pass in a StylePropertyContext when getting images
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/win32-theme: 4/6] Actually pass in a StylePropertyContext when getting images
- Date: Tue, 15 Nov 2011 19:56:22 +0000 (UTC)
commit edeea5b145c8b7e1ada1e68b72689a13d5a3eb18
Author: Alexander Larsson <alexl redhat com>
Date: Tue Nov 15 17:13:22 2011 +0100
Actually pass in a StylePropertyContext when getting images
This is in preparation for getting size-dependent results back
with the win32 themes.
gtk/gtkthemingengine.c | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 81430d5..0c86e64 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -1407,16 +1407,20 @@ render_background_internal (GtkThemingEngine *engine,
GtkRoundedBox border_box;
GtkShadow *box_shadow;
GtkBorder border;
+ GtkStylePropertyContext context;
flags = gtk_theming_engine_get_state (engine);
gtk_theming_engine_get_background_color (engine, flags, &bg_color);
- gtk_theming_engine_get (engine, flags,
- "background-image", &pattern,
- "background-repeat", &repeat,
- "box-shadow", &box_shadow,
- NULL);
+ context.width = width;
+ context.height = height;
+
+ _gtk_theming_engine_get (engine, flags, &context,
+ "background-image", &pattern,
+ "background-repeat", &repeat,
+ "box-shadow", &box_shadow,
+ NULL);
cairo_save (cr);
cairo_translate (cr, x, y);
@@ -1870,15 +1874,19 @@ gtk_theming_engine_render_frame (GtkThemingEngine *engine,
GtkJunctionSides junction;
GtkBorderImage *border_image;
GtkBorder border;
+ GtkStylePropertyContext context;
flags = gtk_theming_engine_get_state (engine);
junction = gtk_theming_engine_get_junction_sides (engine);
gtk_theming_engine_get_border (engine, flags, &border);
- gtk_theming_engine_get (engine, flags,
- "border-image", &border_image,
- "border-style", &border_style,
- NULL);
+ context.width = width;
+ context.height = height;
+
+ _gtk_theming_engine_get (engine, flags, &context,
+ "border-image", &border_image,
+ "border-style", &border_style,
+ NULL);
if (border_image != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]