mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
themingbackground: Remove initializer that takes a GtkThemingEngine
With the unification to use style contexts everywhere, make that initializer the only one to use. Also rename it appropriately.
This commit is contained in:
parent
7e5b58c727
commit
5e8d3d533f
@ -126,7 +126,7 @@ swatch_draw (GtkWidget *widget,
|
||||
gtk_style_context_save (context);
|
||||
gtk_style_context_set_state (context, state);
|
||||
|
||||
_gtk_theming_background_init_from_context (&background, context,
|
||||
_gtk_theming_background_init (&background, context,
|
||||
0, 0, width, height,
|
||||
GTK_JUNCTION_NONE);
|
||||
|
||||
@ -195,7 +195,7 @@ swatch_draw (GtkWidget *widget,
|
||||
GIcon *gicon;
|
||||
|
||||
gtk_style_context_add_class (context, "color-active-badge");
|
||||
_gtk_theming_background_init_from_context (&background, context,
|
||||
_gtk_theming_background_init (&background, context,
|
||||
(width - 2 * ACTIVE_BADGE_RADIUS) / 2, (height - 2 * ACTIVE_BADGE_RADIUS) / 2,
|
||||
2 * ACTIVE_BADGE_RADIUS, 2* ACTIVE_BADGE_RADIUS,
|
||||
GTK_JUNCTION_NONE);
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "gtkcsspositionvalueprivate.h"
|
||||
#include "gtkcssrepeatvalueprivate.h"
|
||||
#include "gtkcsstypesprivate.h"
|
||||
#include "gtkthemingengineprivate.h"
|
||||
#include "gtkstylecontextprivate.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@ -308,25 +308,6 @@ _gtk_theming_background_init_context (GtkThemingBackground *bg)
|
||||
|
||||
void
|
||||
_gtk_theming_background_init (GtkThemingBackground *bg,
|
||||
GtkThemingEngine *engine,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height,
|
||||
GtkJunctionSides junction)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
|
||||
g_assert (bg != NULL);
|
||||
|
||||
context = _gtk_theming_engine_get_context (engine);
|
||||
_gtk_theming_background_init_from_context (bg, context,
|
||||
x, y, width, height,
|
||||
junction);
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_theming_background_init_from_context (GtkThemingBackground *bg,
|
||||
GtkStyleContext *context,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
|
@ -24,8 +24,8 @@
|
||||
#include <cairo.h>
|
||||
|
||||
#include "gtkcssimageprivate.h"
|
||||
#include "gtkstylecontextprivate.h"
|
||||
#include "gtkroundedboxprivate.h"
|
||||
#include "gtktypes.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -44,14 +44,6 @@ struct _GtkThemingBackground {
|
||||
};
|
||||
|
||||
void _gtk_theming_background_init (GtkThemingBackground *bg,
|
||||
GtkThemingEngine *engine,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height,
|
||||
GtkJunctionSides junction);
|
||||
|
||||
void _gtk_theming_background_init_from_context (GtkThemingBackground *bg,
|
||||
GtkStyleContext *context,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
|
@ -20,7 +20,8 @@
|
||||
#include <math.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include <gtk/gtkthemingengine.h>
|
||||
#include "gtkthemingengineprivate.h"
|
||||
|
||||
#include <gtk/gtkstylecontext.h>
|
||||
#include <gtk/gtkintl.h>
|
||||
|
||||
@ -38,8 +39,8 @@
|
||||
#include "gtkcsstransformvalueprivate.h"
|
||||
#include "gtkcsstypesprivate.h"
|
||||
#include "gtkhslaprivate.h"
|
||||
#include "gtkthemingengineprivate.h"
|
||||
#include "gtkroundedboxprivate.h"
|
||||
#include "gtkstylecontextprivate.h"
|
||||
#include "gtkthemingbackgroundprivate.h"
|
||||
|
||||
#include "fallback-c89.c"
|
||||
@ -1385,7 +1386,7 @@ gtk_theming_engine_render_background (GtkThemingEngine *engine,
|
||||
{
|
||||
GtkThemingBackground bg;
|
||||
|
||||
_gtk_theming_background_init (&bg, engine,
|
||||
_gtk_theming_background_init (&bg, engine->priv->context,
|
||||
x, y,
|
||||
width, height,
|
||||
gtk_theming_engine_get_junction_sides (engine));
|
||||
@ -2171,7 +2172,7 @@ gtk_theming_engine_render_extension (GtkThemingEngine *engine,
|
||||
break;
|
||||
}
|
||||
|
||||
_gtk_theming_background_init (&bg, engine,
|
||||
_gtk_theming_background_init (&bg, engine->priv->context,
|
||||
x, y,
|
||||
width, height,
|
||||
junction);
|
||||
@ -2241,7 +2242,7 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
|
||||
color_shade (&bg_color, 0.7, &darker);
|
||||
color_shade (&bg_color, 1.3, &lighter);
|
||||
|
||||
_gtk_theming_background_init (&bg, engine, x, y, width, height, sides);
|
||||
_gtk_theming_background_init (&bg, engine->priv->context, x, y, width, height, sides);
|
||||
has_image = _gtk_theming_background_has_background_image (&bg);
|
||||
_gtk_theming_background_render (&bg, cr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user