space out buttons more

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-02-01 19:14:37 -06:00
parent 663704e3ec
commit f2f43a2b0b
3 changed files with 14 additions and 11 deletions

View File

@ -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)

View File

@ -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 {

View File

@ -87,7 +87,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
// h := newR.h1 - newR.h0
// increment straight down
newH += sizeH
newH += sizeH + 1
if sizeW > maxW {
maxW = sizeW
}