mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-02 16:06:19 +00:00
cmd,example: fix uses of color.NRGBA
Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user