diff --git a/gui/label.go b/gui/label.go index a79bc175..71b8ab02 100644 --- a/gui/label.go +++ b/gui/label.go @@ -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.