Fix up hints to match the GdkColor -> GdkRGBA switch
We no longer need to convert from ints to doubles, GdkRGBA already provides doubles. Closes #129
This commit is contained in:
parent
7593d77027
commit
b47ad17efb
|
@ -1062,9 +1062,10 @@ static maybe<GdkRGBA> get_config_color(GKeyFile *config, const char *section, co
|
||||||
static maybe<cairo_pattern_t *>
|
static maybe<cairo_pattern_t *>
|
||||||
get_config_cairo_color(GKeyFile *config, const char *group, const char *key) {
|
get_config_cairo_color(GKeyFile *config, const char *group, const char *key) {
|
||||||
if (auto color = get_config_color(config, group, key)) {
|
if (auto color = get_config_color(config, group, key)) {
|
||||||
return cairo_pattern_create_rgb(color->red / 65535.0,
|
return cairo_pattern_create_rgba(color->red,
|
||||||
color->green / 65535.0,
|
color->green,
|
||||||
color->blue / 65535.0);
|
color->blue,
|
||||||
|
color->alpha);
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue