Commit 1540788
authored
fix(webkitgtk): normalize u8 color values to 0.0–1.0 for gdk::RGBA (#1692)
gdk::RGBA::new() expects values in the 0.0–1.0 range, but the u8
color components (0–255) were cast directly to f64 without dividing
by 255.0. GDK clamps values >1.0 to 1.0, so any non-zero color
ended up as white.
Fixes #16901 parent a4def18 commit 1540788
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
296 | 299 | | |
297 | 300 | | |
298 | 301 | | |
| |||
763 | 766 | | |
764 | 767 | | |
765 | 768 | | |
766 | | - | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
767 | 773 | | |
768 | 774 | | |
769 | 775 | | |
| |||
0 commit comments