set help window offset

This commit is contained in:
Jeff Carr 2025-03-03 22:21:39 -06:00
parent e73cfaf490
commit b373eab346
4 changed files with 11 additions and 1 deletions

View File

@ -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 err != nil {
if !errors.Is(err, gocui.ErrUnknownView) { if !errors.Is(err, gocui.ErrUnknownView) {
return err return err

View File

@ -193,6 +193,9 @@ func initPlugin() {
me.notify.menu.wId = -6 me.notify.menu.wId = -6
me.notify.menu.offsetH = 0 me.notify.menu.offsetH = 0
me.notify.help.wId = -7
me.notify.help.offsetH = 3
Set(&me.dropdown, "default") Set(&me.dropdown, "default")
// s := fmt.Sprintln("fake default check =", me.FakeW, "dropdown.Id", me.dropdown.Id) // s := fmt.Sprintln("fake default check =", me.FakeW, "dropdown.Id", me.dropdown.Id)
// me.stdout.Write([]byte(s)) // me.stdout.Write([]byte(s))

View File

@ -151,6 +151,7 @@ type libnotify struct {
clock internalTK // widget for the clock clock internalTK // widget for the clock
menu internalTK // libnotify menu icon menu internalTK // libnotify menu icon
window internalTK // the libnotify menu window internalTK // the libnotify menu
help internalTK // the help menu
} }
// this is the gocui way // this is the gocui way

View File

@ -59,6 +59,7 @@ func addWidget(n *tree.Node) {
tk.labelN = "moreSTDOUT" tk.labelN = "moreSTDOUT"
n.State.ProgName = "moreSTDOUT" n.State.ProgName = "moreSTDOUT"
n.State.Label = "moreSTDOUT" n.State.Label = "moreSTDOUT"
tk.isFake = true
return return
case widget.Tab: case widget.Tab:
// tk.color = &colorTab // tk.color = &colorTab