diff options
Diffstat (limited to 'treeDraw.go')
| -rw-r--r-- | treeDraw.go | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/treeDraw.go b/treeDraw.go index c876ee5..86eb673 100644 --- a/treeDraw.go +++ b/treeDraw.go @@ -38,19 +38,17 @@ func (tk *guiWidget) drawView() { c := tk.gocuiSize.w1 d := tk.gocuiSize.h1 + // this is all terrible. This sets the title. kinda if tk.node.WidgetType == widget.Window { - if !tk.resize { - tk.resize = true - tk.textResize() // resize window only once - } else { - tk.full.w0 = tk.force.w0 - tk.full.h0 = tk.force.h0 - // for windows, make it the full size - a = tk.full.w0 - b = tk.full.h0 - c = tk.full.w0 + 20 - d = tk.full.h0 + 2 - } + tk.textResize() + tk.full.w0 = tk.force.w0 + tk.full.h0 = tk.force.h0 + + // for windows, make it the full size + a = tk.full.w0 + b = tk.full.h0 + c = tk.full.w0 + tk.gocuiSize.Width() + d = tk.full.h0 + tk.gocuiSize.Height() } else { if tk.internal { // do nothing @@ -76,16 +74,6 @@ func (tk *guiWidget) drawView() { return } - // this sets up the keybinding for the name of the window - // does this really need to be done? I think we probably already - // know everything about where all the widgets are so we could bypass - // the gocui package and just handle all the mouse events internally here (?) - // for now, the w.v.Name is a string "1", "2", "3", etc from the widgetId - - // set the binding for this gocui view now that it has been created - // gocui handles overlaps of views so it will run on the view that is clicked on - // me.baseGui.SetKeybinding(w.v.Name(), gocui.MouseLeft, gocui.ModNone, click) - // this actually sends the text to display to gocui tk.v.Wrap = true tk.v.Frame = tk.frame |
