mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-06 02:40:07 +00:00
themingengine: Do shading with GtkHSLA
... instead of with symbolic colors.
This commit is contained in:
parent
9aac4dffc5
commit
df25349d63
@ -35,6 +35,7 @@
|
|||||||
#include "gtkcssrgbavalueprivate.h"
|
#include "gtkcssrgbavalueprivate.h"
|
||||||
#include "gtkcssshadowsvalueprivate.h"
|
#include "gtkcssshadowsvalueprivate.h"
|
||||||
#include "gtkcsstypesprivate.h"
|
#include "gtkcsstypesprivate.h"
|
||||||
|
#include "gtkhslaprivate.h"
|
||||||
#include "gtkthemingengineprivate.h"
|
#include "gtkthemingengineprivate.h"
|
||||||
#include "gtkroundedboxprivate.h"
|
#include "gtkroundedboxprivate.h"
|
||||||
#include "gtkthemingbackgroundprivate.h"
|
#include "gtkthemingbackgroundprivate.h"
|
||||||
@ -1339,14 +1340,11 @@ color_shade (const GdkRGBA *color,
|
|||||||
gdouble factor,
|
gdouble factor,
|
||||||
GdkRGBA *color_return)
|
GdkRGBA *color_return)
|
||||||
{
|
{
|
||||||
GtkSymbolicColor *literal, *shade;
|
GtkHSLA hsla;
|
||||||
|
|
||||||
literal = gtk_symbolic_color_new_literal (color);
|
_gtk_hsla_init_from_rgba (&hsla, color);
|
||||||
shade = gtk_symbolic_color_new_shade (literal, factor);
|
_gtk_hsla_shade (&hsla, &hsla, factor);
|
||||||
gtk_symbolic_color_unref (literal);
|
_gdk_rgba_init_from_hsla (color_return, &hsla);
|
||||||
|
|
||||||
gtk_symbolic_color_resolve (shade, NULL, color_return);
|
|
||||||
gtk_symbolic_color_unref (shade);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user