Skip to content

Commit

Permalink
fix accidental variables swap in gl.drawText
Browse files Browse the repository at this point in the history
  • Loading branch information
fpabl0 authored and andydotxyz committed Feb 21, 2021
1 parent 7d2b239 commit 4eeeb07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/painter/gl/draw.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ func (p *glPainter) drawText(text *canvas.Text, pos fyne.Position, frame fyne.Si
pos = fyne.NewPos(pos.X+(containerSize.Width-size.Width)/2, pos.Y)
}

if size.Height > containerSize.Height {
pos = fyne.NewPos(pos.X, pos.Y+(size.Height-containerSize.Height)/2)
if containerSize.Height > size.Height {
pos = fyne.NewPos(pos.X, pos.Y+(containerSize.Height-size.Height)/2)
}

p.drawTextureWithDetails(text, p.newGlTextTexture, pos, size, frame, canvas.ImageFillStretch, 1.0, 0)
Expand Down

0 comments on commit 4eeeb07

Please sign in to comment.