mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-12 20:00:09 +00:00
label: Only put alpha in attributes when needed
It does not do much harm, but it broke some of our tests.
This commit is contained in:
parent
34fb08af6e
commit
abf6ebd7fe
@ -849,11 +849,14 @@ gtk_label_update_layout_attributes (GtkLabel *self,
|
||||
attr->end_index = link->end;
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
|
||||
attr = pango_attr_foreground_alpha_new (CLAMP (link_color->alpha * 65535. + 0.5, 0, 65535));
|
||||
if (link_color->alpha < 0.999)
|
||||
{
|
||||
attr = pango_attr_foreground_alpha_new (CLAMP (link_color->alpha * 65535. + 0.5, 0, 65535));
|
||||
|
||||
attr->start_index = link->start;
|
||||
attr->end_index = link->end;
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
attr->start_index = link->start;
|
||||
attr->end_index = link->end;
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
}
|
||||
|
||||
pango_attr_list_unref (link_attrs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user