mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-30 02:57:38 +00:00
Actually pass in a StylePropertyContext when getting images
This is in preparation for getting size-dependent results back with the win32 themes.
This commit is contained in:
parent
7104b4b575
commit
2cf3ff956a
@ -1407,16 +1407,20 @@ render_background_internal (GtkThemingEngine *engine,
|
|||||||
GtkRoundedBox border_box;
|
GtkRoundedBox border_box;
|
||||||
GtkShadow *box_shadow;
|
GtkShadow *box_shadow;
|
||||||
GtkBorder border;
|
GtkBorder border;
|
||||||
|
GtkStylePropertyContext context;
|
||||||
|
|
||||||
flags = gtk_theming_engine_get_state (engine);
|
flags = gtk_theming_engine_get_state (engine);
|
||||||
|
|
||||||
gtk_theming_engine_get_background_color (engine, flags, &bg_color);
|
gtk_theming_engine_get_background_color (engine, flags, &bg_color);
|
||||||
|
|
||||||
gtk_theming_engine_get (engine, flags,
|
context.width = width;
|
||||||
"background-image", &pattern,
|
context.height = height;
|
||||||
"background-repeat", &repeat,
|
|
||||||
"box-shadow", &box_shadow,
|
_gtk_theming_engine_get (engine, flags, &context,
|
||||||
NULL);
|
"background-image", &pattern,
|
||||||
|
"background-repeat", &repeat,
|
||||||
|
"box-shadow", &box_shadow,
|
||||||
|
NULL);
|
||||||
|
|
||||||
cairo_save (cr);
|
cairo_save (cr);
|
||||||
cairo_translate (cr, x, y);
|
cairo_translate (cr, x, y);
|
||||||
@ -1870,15 +1874,19 @@ gtk_theming_engine_render_frame (GtkThemingEngine *engine,
|
|||||||
GtkJunctionSides junction;
|
GtkJunctionSides junction;
|
||||||
GtkBorderImage *border_image;
|
GtkBorderImage *border_image;
|
||||||
GtkBorder border;
|
GtkBorder border;
|
||||||
|
GtkStylePropertyContext context;
|
||||||
|
|
||||||
flags = gtk_theming_engine_get_state (engine);
|
flags = gtk_theming_engine_get_state (engine);
|
||||||
junction = gtk_theming_engine_get_junction_sides (engine);
|
junction = gtk_theming_engine_get_junction_sides (engine);
|
||||||
gtk_theming_engine_get_border (engine, flags, &border);
|
gtk_theming_engine_get_border (engine, flags, &border);
|
||||||
|
|
||||||
gtk_theming_engine_get (engine, flags,
|
context.width = width;
|
||||||
"border-image", &border_image,
|
context.height = height;
|
||||||
"border-style", &border_style,
|
|
||||||
NULL);
|
_gtk_theming_engine_get (engine, flags, &context,
|
||||||
|
"border-image", &border_image,
|
||||||
|
"border-style", &border_style,
|
||||||
|
NULL);
|
||||||
|
|
||||||
if (border_image != NULL)
|
if (border_image != NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user