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