We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm currently migrating an application I'm working on from go-ui to go.uik
I discovered an issue while building on Linux, and the fixes are simple (incorrect and missing casts)
I got the following errors when trying to build:
../../github.com/skelterjohn/go.wde/xgb/icon.go:57: cannot use width (type int) as type uint in field value ../../github.com/skelterjohn/go.wde/xgb/icon.go:58: cannot use height (type int) as type uint in field value ../../github.com/skelterjohn/go.wde/xgb/icon.go:59: cannot use data (type []int) as type []uint in field value
so I changed the function SetIcon like so:
func (w *Window) SetIcon(icon image.Image) { width := icon.Bounds().Max.X - icon.Bounds().Min.X height := icon.Bounds().Max.Y - icon.Bounds().Min.Y data := make([]uint, width*height) for x := 0; x < width; x++ { for y := 0; y < height; y++ { i := x + y*width c := icon.At(x, y) r, g, b, a := c.RGBA() data[i] = uint(a + r<<8 + g<<16 + b<<24) } } wmicon := ewmh.WmIcon{ Width: uint(width), Height: uint(height), Data: data, } ewmh.WmIconSet(w.xu, w.win.Id, []ewmh.WmIcon{wmicon}) }
and it now builds and runs properly.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm currently migrating an application I'm working on from go-ui to go.uik
I discovered an issue while building on Linux, and the fixes are simple (incorrect and missing casts)
I got the following errors when trying to build:
so I changed the function SetIcon like so:
and it now builds and runs properly.
The text was updated successfully, but these errors were encountered: