mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 08:40:08 +00:00
Handle transparent colors better in GtkStyle emulation
We can't expose colors with alpha in the GtkStyle colors, since GdkColor has no alpha. Currently we throw away alpha completely, which fails very badly for completely transparent backgrounds, which now is the default for most widgets, as it typically end up with black-on-black. We handle this by falling back on the default/previous colors for transparent colors. This is is simple and avoids complete failure. https://bugzilla.gnome.org/show_bug.cgi?id=671437
This commit is contained in:
parent
e307f08ec2
commit
1042372670
@ -673,7 +673,7 @@ set_color (GtkStyle *style,
|
||||
break;
|
||||
}
|
||||
|
||||
if (color)
|
||||
if (color && color->alpha > 0.01)
|
||||
{
|
||||
dest->pixel = 0;
|
||||
dest->red = CLAMP ((guint) (color->red * 65535), 0, 65535);
|
||||
|
Loading…
Reference in New Issue
Block a user