mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
gl renderer: Fix linear gradient shader color calculation
This fixes both the wrong headerbar color and the broken border color in of the circular button in the widget-factory.
This commit is contained in:
parent
eb221ff305
commit
bed03aa319
@ -34,7 +34,7 @@ void main() {
|
||||
for (int i = 1; i < u_num_color_stops; i ++) {
|
||||
if (offset >= u_color_offsets[i - 1]) {
|
||||
float o = (offset - u_color_offsets[i - 1]) / (u_color_offsets[i] - u_color_offsets[i - 1]);
|
||||
color = mix(u_color_stops[i - 1], u_color_stops[i], o);
|
||||
color = mix(u_color_stops[i - 1], u_color_stops[i], clamp(o, 0.0, 1.0));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user