0.0.10 Updated colors. /JL
This commit is contained in:
@@ -52,13 +52,11 @@ func NewBeadColor(mw *MyMainWindow, name string, id int, red byte, green byte, b
|
|||||||
cm, _ := walk.NewComposite(mw.colors)
|
cm, _ := walk.NewComposite(mw.colors)
|
||||||
cm.SetAlignment(walk.AlignHNearVCenter)
|
cm.SetAlignment(walk.AlignHNearVCenter)
|
||||||
hb := walk.NewHBoxLayout()
|
hb := walk.NewHBoxLayout()
|
||||||
hb.SetMargins(walk.Margins{0, 0, 0, 0})
|
hb.SetMargins(walk.Margins{5, 0, 20, 0})
|
||||||
cm.SetLayout(hb)
|
cm.SetLayout(hb)
|
||||||
color := new(BeadColor)
|
color := new(BeadColor)
|
||||||
log.Println("Bead color struct: ", color)
|
log.Println("Bead color struct: ", color)
|
||||||
color.SetBackgroundColor(walk.RGB(red, green, blue))
|
color.SetBackgroundColor(walk.RGB(red, green, blue))
|
||||||
lbl, _ := walk.NewLabel(cm)
|
|
||||||
lbl.SetText(fmt.Sprint("Color ID: ", id))
|
|
||||||
log.Println("Creating checkbox")
|
log.Println("Creating checkbox")
|
||||||
color.Checkbox, err = walk.NewCheckBox(cm)
|
color.Checkbox, err = walk.NewCheckBox(cm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -69,6 +67,8 @@ func NewBeadColor(mw *MyMainWindow, name string, id int, red byte, green byte, b
|
|||||||
color.Checkbox.SetText(name)
|
color.Checkbox.SetText(name)
|
||||||
log.Println("Checkbox name set")
|
log.Println("Checkbox name set")
|
||||||
walk.NewHSpacer(cm)
|
walk.NewHSpacer(cm)
|
||||||
|
lbl, _ := walk.NewLabel(cm)
|
||||||
|
lbl.SetText(fmt.Sprint("Color ID: ", id))
|
||||||
cm.SetBackground(color.backgroundColor)
|
cm.SetBackground(color.backgroundColor)
|
||||||
|
|
||||||
return color
|
return color
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ type MyMainWindow struct {
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
AppName string = "BeadImager"
|
AppName string = "BeadImager"
|
||||||
Version string = "0.0.9"
|
Version string = "0.0.10"
|
||||||
CopyRight string = "©2022 Jan Lerking"
|
CopyRight string = "©2022 Jan Lerking"
|
||||||
STD_MESS string = "Ready"
|
STD_MESS string = "Ready"
|
||||||
UserPath string = "C:\\Users\\janle\\BeadImager"
|
UserPath string = "C:\\Users\\janle\\BeadImager"
|
||||||
@@ -50,6 +50,9 @@ func main() {
|
|||||||
pegboard_trigged := false
|
pegboard_trigged := false
|
||||||
|
|
||||||
DD_Pallette := Composite{
|
DD_Pallette := Composite{
|
||||||
|
Layout: VBox{MarginsZero: true},
|
||||||
|
Children: []Widget{
|
||||||
|
Composite{
|
||||||
Layout: HBox{MarginsZero: true},
|
Layout: HBox{MarginsZero: true},
|
||||||
Children: []Widget{
|
Children: []Widget{
|
||||||
Label{
|
Label{
|
||||||
@@ -68,11 +71,9 @@ func main() {
|
|||||||
pallette_trigged = true
|
pallette_trigged = true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
HSpacer{},
|
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
Composite{
|
||||||
DD_Serie := Composite{
|
|
||||||
Layout: HBox{MarginsZero: true},
|
Layout: HBox{MarginsZero: true},
|
||||||
Children: []Widget{
|
Children: []Widget{
|
||||||
Label{
|
Label{
|
||||||
@@ -93,11 +94,9 @@ func main() {
|
|||||||
serie_trigged = true
|
serie_trigged = true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
HSpacer{},
|
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
Composite{
|
||||||
DD_Pegboard := Composite{
|
|
||||||
Layout: HBox{MarginsZero: true},
|
Layout: HBox{MarginsZero: true},
|
||||||
Children: []Widget{
|
Children: []Widget{
|
||||||
Label{
|
Label{
|
||||||
@@ -113,7 +112,8 @@ func main() {
|
|||||||
pegboard_trigged = true
|
pegboard_trigged = true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
HSpacer{},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,14 +125,12 @@ func main() {
|
|||||||
Layout: VBox{MarginsZero: true},
|
Layout: VBox{MarginsZero: true},
|
||||||
Children: []Widget{
|
Children: []Widget{
|
||||||
Composite{
|
Composite{
|
||||||
Layout: HBox{MarginsZero: true},
|
Layout: HBox{},
|
||||||
Children: []Widget{
|
Children: []Widget{
|
||||||
Composite{
|
Composite{
|
||||||
Layout: VBox{MarginsZero: true},
|
Layout: VBox{MarginsZero: true},
|
||||||
Children: []Widget{
|
Children: []Widget{
|
||||||
DD_Pallette,
|
DD_Pallette,
|
||||||
DD_Serie,
|
|
||||||
DD_Pegboard,
|
|
||||||
PushButton{
|
PushButton{
|
||||||
Text: "Select all colors",
|
Text: "Select all colors",
|
||||||
OnClicked: func() {
|
OnClicked: func() {
|
||||||
|
|||||||
Reference in New Issue
Block a user