space out buttons more
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
663704e3ec
commit
f2f43a2b0b
21
click.go
21
click.go
|
@ -183,9 +183,16 @@ func (w *guiWidget) doWidgetClick() {
|
|||
me.myTree.SendUserEvent(w.node)
|
||||
case widget.Dropdown:
|
||||
log.Log(NOW, "do the dropdown here")
|
||||
var ddItems string
|
||||
for i, s := range w.vals {
|
||||
log.Log(NOW, "ddItem:", w.String(), i, s)
|
||||
ddItems += s + "\n"
|
||||
}
|
||||
if me.ddview == nil {
|
||||
me.ddview = addDropdown()
|
||||
tk := me.ddview.TK.(*guiWidget)
|
||||
tk.labelN = ddItems
|
||||
tk.SetText(ddItems)
|
||||
tk.gocuiSize.w0 = 20
|
||||
tk.gocuiSize.w1 = 40
|
||||
tk.gocuiSize.h0 = 10
|
||||
|
@ -201,7 +208,7 @@ func (w *guiWidget) doWidgetClick() {
|
|||
tk.v.Wrap = true
|
||||
tk.v.Frame = true
|
||||
tk.v.Clear()
|
||||
fmt.Fprint(tk.v, "example.com\nwit.com")
|
||||
fmt.Fprint(tk.v, ddItems)
|
||||
tk.SetVisible(true)
|
||||
return
|
||||
}
|
||||
|
@ -213,16 +220,12 @@ func (w *guiWidget) doWidgetClick() {
|
|||
me.baseGui.DeleteView("ddview")
|
||||
tk.v = nil
|
||||
} else {
|
||||
var dnsList string
|
||||
for i, s := range tk.vals {
|
||||
log.Log(NOW, "AddText()", w.String(), i, s)
|
||||
dnsList += s + "\n"
|
||||
}
|
||||
me.ddNode = w.node
|
||||
log.Log(NOW, "new dns list should be set to:", dnsList)
|
||||
tk.labelN = dnsList
|
||||
tk.SetText(dnsList)
|
||||
log.Log(NOW, "new dns list should be set to:", ddItems)
|
||||
tk.labelN = ddItems
|
||||
tk.SetText(ddItems)
|
||||
tk.SetVisible(true)
|
||||
fmt.Fprint(tk.v, ddItems)
|
||||
}
|
||||
for i, s := range tk.vals {
|
||||
log.Log(NOW, "AddText()", tk.String(), i, s)
|
||||
|
|
2
mouse.go
2
mouse.go
|
@ -89,7 +89,7 @@ func makeDropdownView() {
|
|||
tk.v.Wrap = true
|
||||
tk.v.Frame = true
|
||||
tk.v.Clear()
|
||||
fmt.Fprint(tk.v, "example.com\nwit.com")
|
||||
fmt.Fprint(tk.v, tk.labelN)
|
||||
}
|
||||
|
||||
func mouseUp(g *gocui.Gui, v *gocui.View) error {
|
||||
|
|
Loading…
Reference in New Issue