Set value rather than append
This commit is contained in:
parent
ac4239754f
commit
4e7e3956db
|
@ -132,9 +132,9 @@ func NewWindow(cfg WindowConfig) (*Window, error) {
|
|||
|
||||
runtime.SetFinalizer(w, (*Window).Destroy)
|
||||
imgs := make([]image.Image, len(cfg.Icon))
|
||||
for _, v := range cfg.Icon {
|
||||
for i, v := range cfg.Icon {
|
||||
pic := pixel.PictureDataFromPicture(v)
|
||||
imgs = append(imgs, pic.Image())
|
||||
imgs[i] = pic.Image()
|
||||
}
|
||||
mainthread.Call(func() {
|
||||
w.window.SetIcon(imgs)
|
||||
|
|
Loading…
Reference in New Issue