Set value rather than append

This commit is contained in:
Ousmane Traore 2017-04-30 19:30:11 -04:00
parent ac4239754f
commit 4e7e3956db
1 changed files with 2 additions and 2 deletions

View File

@ -132,9 +132,9 @@ func NewWindow(cfg WindowConfig) (*Window, error) {
runtime.SetFinalizer(w, (*Window).Destroy) runtime.SetFinalizer(w, (*Window).Destroy)
imgs := make([]image.Image, len(cfg.Icon)) imgs := make([]image.Image, len(cfg.Icon))
for _, v := range cfg.Icon { for i, v := range cfg.Icon {
pic := pixel.PictureDataFromPicture(v) pic := pixel.PictureDataFromPicture(v)
imgs = append(imgs, pic.Image()) imgs[i] = pic.Image()
} }
mainthread.Call(func() { mainthread.Call(func() {
w.window.SetIcon(imgs) w.window.SetIcon(imgs)