aboutsummaryrefslogtreecommitdiffstats
path: root/ui.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-01-20 18:03:39 -0500
committerSam Anthony <sam@samanthony.xyz>2024-01-20 18:03:39 -0500
commitc952a096a161e991a54a569b71c7bb773b583eb3 (patch)
treee75f7229db61417b3c12489b0ef6efef0404d719 /ui.go
parentd33a8a46d8d00117e792608f879e30e7a4b31a37 (diff)
downloadvolute-c952a096a161e991a54a569b71c7bb773b583eb3.zip
use variable rather than function for color constant
Diffstat (limited to 'ui.go')
-rw-r--r--ui.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/ui.go b/ui.go
index 28692d6..f132dd1 100644
--- a/ui.go
+++ b/ui.go
@@ -9,9 +9,7 @@ import (
"strconv"
)
-func red() color.RGBA {
- return color.RGBA{255, 0, 0, 255}
-}
+var red = color.RGBA{255, 0, 0, 255}
func displacementRow() *g.RowWidget {
s := VolumeUnits[volumeUnitIndex]
@@ -303,7 +301,7 @@ func updateCompImg() {
ps := img.Bounds().Dx() / 100 // Point size
draw.Draw(img,
image.Rect(pos.X-ps/2, pos.Y-ps/2, pos.X+ps/2, pos.Y+ps/2),
- &image.Uniform{red()},
+ &image.Uniform{red},
image.ZP,
draw.Src,
)