summaryrefslogtreecommitdiff
path: root/toolkit/gocui/click.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-12-16 06:57:39 -0600
committerJeff Carr <[email protected]>2023-12-16 06:57:39 -0600
commit87ab9a958d9eb9f4db35d5c9f9ce923df3132dad (patch)
treefd3ee29d828e9e69175a6ca04fec6ae0fe60fcc0 /toolkit/gocui/click.go
parentdcce32583387be7fc4f6cd8c8dea62fd7dc42ecf (diff)
gocui: fixes to labels + line entriesv0.8.8.1v0.8.8
correct line hight dump non-working size rectangle code somehow works better better dropdown menu debugging minor fixes to common.go more common code Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/click.go')
-rw-r--r--toolkit/gocui/click.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/toolkit/gocui/click.go b/toolkit/gocui/click.go
index cb58bc3..7c9ab24 100644
--- a/toolkit/gocui/click.go
+++ b/toolkit/gocui/click.go
@@ -93,8 +93,8 @@ func (n *node) doWidgetClick() {
log("doWidgetClick()", n.Name)
redoWindows(0,0)
case toolkit.Flag:
- // me.rootNode.redoColor(true)
- me.rootNode.dumpTree(true)
+ log("doWidgetClick() FLAG widget name =", n.Name)
+ log("doWidgetClick() if this is the dropdown menu, handle it here?")
case toolkit.Window:
if (me.currentWindow == n) {
return
@@ -155,7 +155,13 @@ func (n *node) doWidgetClick() {
}
n.doUserEvent()
case toolkit.Grid:
- n.placeGrid(n.tk.size.w0, n.tk.size.h0)
+ newR := n.realGocuiSize()
+
+ // w,h := n.logicalSize()
+ // w := newR.w1 - newR.w0
+ // h := newR.h1 - newR.h0
+
+ n.placeGrid(newR.w0, newR.h0)
n.showWidgets()
case toolkit.Box:
// w.showWidgetPlacement(logNow, "drawTree()")
@@ -267,12 +273,14 @@ func click(g *gocui.Gui, v *gocui.View) error {
}
if _, err := g.SetCurrentView(v.Name()); err != nil {
+ log(logNow, "click() END err =", err)
return err
}
log(logVerbose, "click() END")
return nil
}
+
func findUnderMouse() *node {
var found *node
var widgets []*node