Skip to content

Commit

Permalink
we should devide on int but not floor, or the text will be out of shape
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Dec 3, 2023
1 parent 31f7701 commit 73f1b6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ func (l *Label) SetText(text string) {
}

// Update label panel dimensions
width, height := float32(textImage.Rect.Dx()), float32(textImage.Rect.Dy())
width, height := textImage.Rect.Dx(), textImage.Rect.Dy()
if runtime.GOOS == "darwin" {
// since we enlarged the font texture for higher quality, we have to scale it back to it's original point size
width, height = width / 2, height / 2
}
l.Panel.SetContentSize(width, height)
l.Panel.SetContentSize(float32(width), float32(height))
}

// Text returns the label text.
Expand Down

0 comments on commit 73f1b6a

Please sign in to comment.