parent
5fab51d2a3
commit
2d13d83cf5
|
@ -19,6 +19,7 @@ var mychannel chan *pb.Event
|
||||||
|
|
||||||
var currentMessage *pb.Event
|
var currentMessage *pb.Event
|
||||||
|
|
||||||
|
var windowsTextBlack = color.RGBA{10, 10, 10, 10}
|
||||||
var windowsTextWhite = color.RGBA{255, 255, 255, 255}
|
var windowsTextWhite = color.RGBA{255, 255, 255, 255}
|
||||||
var windowsTextYellow = color.RGBA{200, 200, 0, 200}
|
var windowsTextYellow = color.RGBA{200, 200, 0, 200}
|
||||||
var windowsTextRed = color.RGBA{200, 0, 0, 200}
|
var windowsTextRed = color.RGBA{200, 0, 0, 200}
|
||||||
|
@ -28,6 +29,10 @@ var windowsBgBlack = color.RGBA{55, 55, 55, 255}
|
||||||
|
|
||||||
var linuxTextBlue = color.RGBA{0, 100, 200, 100}
|
var linuxTextBlue = color.RGBA{0, 100, 200, 100}
|
||||||
var linuxTextBlack = color.RGBA{0, 0, 0, 0}
|
var linuxTextBlack = color.RGBA{0, 0, 0, 0}
|
||||||
|
var linuxTextYellow = color.RGBA{200, 200, 0, 200}
|
||||||
|
var linuxBgMauve = color.RGBA{72, 0, 0, 142}
|
||||||
|
var linuxBgBlack = color.RGBA{55, 55, 55, 255}
|
||||||
|
var linuxBgWhite = color.RGBA{0, 0, 0, 0}
|
||||||
|
|
||||||
func initChannel() {
|
func initChannel() {
|
||||||
mychannel = make(chan *pb.Event)
|
mychannel = make(chan *pb.Event)
|
||||||
|
@ -78,11 +83,12 @@ func ReadReceivedData(data *pb.Event, mh *gui.TableData) {
|
||||||
log.Println("ReadReceivedData() Event vms=", vms)
|
log.Println("ReadReceivedData() Event vms=", vms)
|
||||||
for row, item := range vms {
|
for row, item := range vms {
|
||||||
defaultTextColor := linuxTextBlue
|
defaultTextColor := linuxTextBlue
|
||||||
defaultTextYellow := windowsTextYellow
|
defaultTextYellow := linuxTextYellow
|
||||||
defaultTextBlack := linuxTextBlack
|
defaultTextBlack := linuxTextBlack
|
||||||
|
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
defaultTextColor = windowsTextRed
|
defaultTextColor = windowsTextRed
|
||||||
defaultTextBlack = windowsTextRed
|
defaultTextBlack = windowsTextBlack
|
||||||
}
|
}
|
||||||
// if (row % 2) == 1 {
|
// if (row % 2) == 1 {
|
||||||
if (row == 1) {
|
if (row == 1) {
|
||||||
|
@ -96,8 +102,7 @@ func ReadReceivedData(data *pb.Event, mh *gui.TableData) {
|
||||||
} else if (row == 5) {
|
} else if (row == 5) {
|
||||||
mh.Rows[row].HumanData[0].Color = color.RGBA{55, 55, 55, 255} // makes the background of each other row grey
|
mh.Rows[row].HumanData[0].Color = color.RGBA{55, 55, 55, 255} // makes the background of each other row grey
|
||||||
} else {
|
} else {
|
||||||
mh.Rows[row].HumanData[0].Color = color.RGBA{72, 0, 0, 142}
|
mh.Rows[row].HumanData[0].Color = linuxBgMauve
|
||||||
// mh.Rows[row].HumanData[0].Color = nil
|
|
||||||
}
|
}
|
||||||
mh.Rows[row].HumanData[1].Text = item.Name
|
mh.Rows[row].HumanData[1].Text = item.Name
|
||||||
mh.Rows[row].HumanData[1].Color = defaultTextColor
|
mh.Rows[row].HumanData[1].Color = defaultTextColor
|
||||||
|
|
Loading…
Reference in New Issue