Skip to content

Commit 73b2a6e

Browse files
committed
Use the desired button size for new image, fixes magicmonkey#31
1 parent 35e6a98 commit 73b2a6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

buttons/imagefile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type ImageFileButton struct {
2323
func (btn *ImageFileButton) GetImageForButton(btnSize int) image.Image {
2424
// Resize the image to what the button wants
2525
g := gift.New(gift.Resize(btnSize, btnSize, gift.LanczosResampling))
26-
newimg := image.NewRGBA(image.Rect(0, 0, btn.img.Bounds().Max.X, btn.img.Bounds().Max.Y))
26+
newimg := image.NewRGBA(image.Rect(0, 0, btnSize, btnSize))
2727
g.Draw(newimg, btn.img)
2828
return newimg
2929
}

0 commit comments

Comments
 (0)