cmd,example: fix uses of color.NRGBA

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
Egon Elbre
2020-11-18 20:40:38 +02:00
committed by Elias Naur
parent 21ef492cc9
commit 2affb6eaa4
10 changed files with 32 additions and 35 deletions
+4 -4
View File
@@ -102,12 +102,12 @@ func newUI(fetchCommits func(string)) *UI {
return u
}
func rgb(c uint32) color.RGBA {
func rgb(c uint32) color.NRGBA {
return argb((0xff << 24) | c)
}
func argb(c uint32) color.RGBA {
return color.RGBA{A: uint8(c >> 24), R: uint8(c >> 16), G: uint8(c >> 8), B: uint8(c)}
func argb(c uint32) color.NRGBA {
return color.NRGBA{A: uint8(c >> 24), R: uint8(c >> 16), G: uint8(c >> 8), B: uint8(c)}
}
func (u *UI) layoutTimings(gtx layout.Context) {
@@ -321,7 +321,7 @@ func (u *user) layoutAvatar(gtx layout.Context) layout.Dimensions {
}
type fill struct {
col color.RGBA
col color.NRGBA
}
func (f fill) Layout(gtx layout.Context) layout.Dimensions {