feat: add colors to text
This commit is contained in:
parent
ad03394681
commit
fa4a4acd9b
@ -1,4 +1,4 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
const DefaultPortSerialNumber = ""
|
const DefaultPortSerialNumber = "121212121"
|
||||||
const SerialPortBaudRate = 921600
|
const SerialPortBaudRate = 921600
|
||||||
|
5
main.go
5
main.go
@ -22,6 +22,7 @@ func main() {
|
|||||||
status := canvas.NewText("Waiting", color.White)
|
status := canvas.NewText("Waiting", color.White)
|
||||||
status.Alignment = fyne.TextAlignCenter
|
status.Alignment = fyne.TextAlignCenter
|
||||||
status.TextSize = 50
|
status.TextSize = 50
|
||||||
|
status.Color = color.NRGBA{255, 170, 50, 255}
|
||||||
|
|
||||||
w.SetContent(container.NewVBox(
|
w.SetContent(container.NewVBox(
|
||||||
status,
|
status,
|
||||||
@ -32,10 +33,12 @@ func main() {
|
|||||||
init = true
|
init = true
|
||||||
status.Text = "Connected"
|
status.Text = "Connected"
|
||||||
status.TextSize = 50
|
status.TextSize = 50
|
||||||
|
status.Color = color.NRGBA{255, 255, 255, 255}
|
||||||
status.Refresh()
|
status.Refresh()
|
||||||
} else {
|
} else {
|
||||||
status.Text = "Cannot detect a device with the given name."
|
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()
|
status.Refresh()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user