diff options
| author | Jeff Carr <[email protected]> | 2025-03-03 22:21:39 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-03 22:21:39 -0600 |
| commit | b373eab346cc96c8c790d9713824a9208e435748 (patch) | |
| tree | 44693df571033a1f46b1d29000966fc8c0165436 | |
| parent | e73cfaf490774b80f15790ae3f04af44fa2adde1 (diff) | |
set help window offset
| -rw-r--r-- | help.go | 7 | ||||
| -rw-r--r-- | init.go | 3 | ||||
| -rw-r--r-- | structs.go | 1 | ||||
| -rw-r--r-- | treeAdd.go | 1 |
4 files changed, 11 insertions, 1 deletions
@@ -65,7 +65,12 @@ func showHelp() error { } } - help, err := g.SetView("help", maxX-(newW+me.FramePadW), 0, maxX-1, len(helpText)+me.FramePadH, 0) + a := maxX - (newW + me.FramePadW) + b := me.notify.help.offsetH + c := maxX - 1 + d := me.notify.help.offsetH + len(helpText) + me.FramePadH + + help, err := g.SetView("help", a, b, c, d, 0) if err != nil { if !errors.Is(err, gocui.ErrUnknownView) { return err @@ -193,6 +193,9 @@ func initPlugin() { me.notify.menu.wId = -6 me.notify.menu.offsetH = 0 + me.notify.help.wId = -7 + me.notify.help.offsetH = 3 + Set(&me.dropdown, "default") // s := fmt.Sprintln("fake default check =", me.FakeW, "dropdown.Id", me.dropdown.Id) // me.stdout.Write([]byte(s)) @@ -151,6 +151,7 @@ type libnotify struct { clock internalTK // widget for the clock menu internalTK // libnotify menu icon window internalTK // the libnotify menu + help internalTK // the help menu } // this is the gocui way @@ -59,6 +59,7 @@ func addWidget(n *tree.Node) { tk.labelN = "moreSTDOUT" n.State.ProgName = "moreSTDOUT" n.State.Label = "moreSTDOUT" + tk.isFake = true return case widget.Tab: // tk.color = &colorTab |
