set help window offset
This commit is contained in:
parent
e73cfaf490
commit
b373eab346
7
help.go
7
help.go
|
@ -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
|
||||
|
|
3
init.go
3
init.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue