mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
widget: use correct color in Icon
iconvg seems to expect a linear premultiplied color. Fixes gio#132 Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ func (ic *Icon) image(sz int) paint.ImageOp {
|
||||
img := image.NewRGBA(image.Rectangle{Max: image.Point{X: sz, Y: int(float32(sz) * dy / dx)}})
|
||||
var ico iconvg.Rasterizer
|
||||
ico.SetDstImage(img, img.Bounds(), draw.Src)
|
||||
m.Palette[0] = f32color.NRGBAToRGBA(ic.Color)
|
||||
m.Palette[0] = f32color.NRGBAToLinearRGBA(ic.Color)
|
||||
iconvg.Decode(&ico, ic.src, &iconvg.DecodeOptions{
|
||||
Palette: &m.Palette,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user