Skip to content

Commit

Permalink
Minor fix: adjust location of picture
Browse files Browse the repository at this point in the history
  • Loading branch information
tramhao committed May 21, 2021
1 parent 6c5eb76 commit e6aeb69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion playingbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func (p *PlayingBar) updatePhoto() {
// resize the photo according to space left for x and y axis
dstImage := imaging.Resize(p.albumPhotoSource, imageWidth, 0, imaging.Lanczos)
positionX := x*colPixel + width*colPixel - dstImage.Rect.Dx() - colPixel
positionY := y*rowPixel - dstImage.Rect.Dy() - rowPixel/2
positionY := y*rowPixel - rowPixel - dstImage.Rect.Dy()

// register new image
p.albumPhoto, err = ugo.NewImage(dstImage, positionX, positionY)
Expand Down

0 comments on commit e6aeb69

Please sign in to comment.