feat: add colors to text

This commit is contained in:
Louis Dalibard 2024-04-23 18:37:56 +02:00
parent ad03394681
commit fa4a4acd9b
3 changed files with 5 additions and 2 deletions

BIN
adam-gui

Binary file not shown.

View File

@ -1,4 +1,4 @@
package config
const DefaultPortSerialNumber = ""
const DefaultPortSerialNumber = "121212121"
const SerialPortBaudRate = 921600

View File

@ -22,6 +22,7 @@ func main() {
status := canvas.NewText("Waiting", color.White)
status.Alignment = fyne.TextAlignCenter
status.TextSize = 50
status.Color = color.NRGBA{255, 170, 50, 255}
w.SetContent(container.NewVBox(
status,
@ -32,10 +33,12 @@ func main() {
init = true
status.Text = "Connected"
status.TextSize = 50
status.Color = color.NRGBA{255, 255, 255, 255}
status.Refresh()
} else {
status.Text = "Cannot detect a device with the given name."
status.TextSize = 10
status.TextSize = 25
status.Color = color.NRGBA{255, 50, 50, 255}
status.Refresh()
}
}