move guage label to left
This commit is contained in:
parent
ec0ef9f907
commit
4a4d9b58da
|
@ -106,7 +106,7 @@ func (g *Gauge) Draw(buffer *ui.Buffer) {
|
||||||
)
|
)
|
||||||
|
|
||||||
// draw label
|
// draw label
|
||||||
labelXCoordinate := g.Inner.Min.X + (g.Inner.Dx() / 2) - int(float64(len(label))/2)
|
labelXCoordinate := g.Inner.Min.X
|
||||||
labelYCoordinate := g.Inner.Min.Y + ((g.Inner.Dy() - 1) / 2)
|
labelYCoordinate := g.Inner.Min.Y + ((g.Inner.Dy() - 1) / 2)
|
||||||
if labelYCoordinate < g.Inner.Max.Y {
|
if labelYCoordinate < g.Inner.Max.Y {
|
||||||
for i, char := range label {
|
for i, char := range label {
|
||||||
|
|
Loading…
Reference in New Issue