#include "gtkcssrgbavalueprivate.h"
#include "gtkcssshadowsvalueprivate.h"
#include "gtkcsstypesprivate.h"
+#include "gtkhslaprivate.h"
#include "gtkthemingengineprivate.h"
#include "gtkroundedboxprivate.h"
#include "gtkthemingbackgroundprivate.h"
return _gtk_style_context_peek_property (engine->priv->context, property_id);
}
-double
-_gtk_theming_engine_get_number (GtkThemingEngine *engine,
- guint property_id,
- double one_hundred_percent)
-{
- g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), 0.0);
-
- return _gtk_style_context_get_number (engine->priv->context, property_id, one_hundred_percent);
-}
-
/**
* gtk_theming_engine_get_property:
* @engine: a #GtkThemingEngine
* Returns: the widget direction
*
* Since: 3.0
+ *
+ * Deprecated: 3.8: Use gtk_theming_engine_get_state() and
+ * check for #GTK_STATE_FLAG_DIR_LTR and
+ * #GTK_STATE_FLAG_DIR_RTL instead.
**/
GtkTextDirection
gtk_theming_engine_get_direction (GtkThemingEngine *engine)
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), GTK_TEXT_DIR_LTR);
priv = engine->priv;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
return gtk_style_context_get_direction (priv->context);
+ G_GNUC_END_IGNORE_DEPRECATIONS;
}
/**
* freed.
*
* Since: 3.0
+ *
+ * Deprecated: 3.8: Use gtk_theming_engine_get()
**/
const PangoFontDescription *
gtk_theming_engine_get_font (GtkThemingEngine *engine,
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), NULL);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
priv = engine->priv;
return gtk_style_context_get_font (priv->context, state);
+ G_GNUC_END_IGNORE_DEPRECATIONS;
}
/* GtkThemingModule */
gdouble factor,
GdkRGBA *color_return)
{
- GtkSymbolicColor *literal, *shade;
+ GtkHSLA hsla;
- literal = gtk_symbolic_color_new_literal (color);
- shade = gtk_symbolic_color_new_shade (literal, factor);
- gtk_symbolic_color_unref (literal);
-
- gtk_symbolic_color_resolve (shade, NULL, color_return);
- gtk_symbolic_color_unref (shade);
+ _gtk_hsla_init_from_rgba (&hsla, color);
+ _gtk_hsla_shade (&hsla, &hsla, factor);
+ _gdk_rgba_init_from_hsla (color_return, &hsla);
}
static void
2 * other_border[GTK_CSS_LEFT]);
render_frame_fill (cr, &other_box, other_border, colors, dont_draw);
}
+ break;
case GTK_BORDER_STYLE_GROOVE:
case GTK_BORDER_STYLE_RIDGE:
{
gtk_theming_engine_get_color (engine, flags, &fg_color);
gtk_theming_engine_get_border_color (engine, flags, &outline_color);
- is_rtl = (gtk_theming_engine_get_direction (engine) == GTK_TEXT_DIR_RTL);
+ is_rtl = (gtk_theming_engine_get_state (engine) & GTK_STATE_FLAG_DIR_RTL);
line_width = 1;
progress = (flags & GTK_STATE_FLAG_ACTIVE) ? 1 : 0;