better window titlebar
This commit is contained in:
parent
955afcb1a9
commit
9a08b37be4
|
@ -42,10 +42,10 @@ func (tk *guiWidget) setColorWindowTitle() {
|
|||
return
|
||||
}
|
||||
tk.color.frame = gocui.ColorWhite
|
||||
tk.color.fg = gocui.AttrNone
|
||||
tk.color.fg = gocui.ColorWhite
|
||||
tk.color.bg = gocui.ColorBlue
|
||||
tk.color.selFg = gocui.ColorBlue
|
||||
tk.color.selBg = gocui.AttrNone
|
||||
tk.color.selFg = gocui.ColorWhite
|
||||
tk.color.selBg = gocui.ColorBlue
|
||||
}
|
||||
|
||||
func (tk *guiWidget) setColorBG() {
|
||||
|
|
|
@ -105,7 +105,7 @@ func doMouseClick(w int, h int) {
|
|||
if win.checkWindowClose(w, h) {
|
||||
return
|
||||
}
|
||||
log.Info("you clicked on a window, but not any widgets. check for title / close window here", win.cuiName)
|
||||
// log.Info("you clicked on a window, but not any widgets. check for title / close window here", win.cuiName)
|
||||
win.redrawWindow(win.gocuiSize.w0, win.gocuiSize.h0)
|
||||
me.stdout.outputOnTop = false
|
||||
setThingsOnTop()
|
||||
|
|
|
@ -33,7 +33,7 @@ func (callertk *guiWidget) showTextbox() {
|
|||
if me.textbox.tk == nil {
|
||||
// should only happen once
|
||||
me.textbox.tk = makeNewFlagWidget(me.textbox.wId)
|
||||
me.textbox.tk.dumpWidget("init() textbox")
|
||||
// me.textbox.tk.dumpWidget("init() textbox")
|
||||
}
|
||||
if me.textbox.tk == nil {
|
||||
log.Log(GOCUI, "showTextbox() Is Broken")
|
||||
|
@ -60,7 +60,7 @@ func (callertk *guiWidget) showTextbox() {
|
|||
me.textbox.tk.setColorModal()
|
||||
me.textbox.tk.v.Clear()
|
||||
cur := strings.TrimSpace(callertk.String())
|
||||
log.Info("setting textbox string to:", cur)
|
||||
// log.Info("setting textbox string to:", cur)
|
||||
me.textbox.tk.v.WriteString(cur)
|
||||
|
||||
me.textbox.tk.v.Editable = true
|
||||
|
@ -95,7 +95,7 @@ func textboxClosed() {
|
|||
newtext = strings.TrimSpace(newtext)
|
||||
me.textbox.active = false
|
||||
me.textbox.tk.Hide()
|
||||
log.Info("textbox closed with text:", newtext, me.textbox.callerTK.cuiName)
|
||||
// log.Info("textbox closed with text:", newtext, me.textbox.callerTK.cuiName)
|
||||
|
||||
if me.clock.tk.v != nil {
|
||||
me.baseGui.SetCurrentView("help")
|
||||
|
|
|
@ -19,15 +19,16 @@ func (tk *guiWidget) setTitle(s string) {
|
|||
if tk.v == nil {
|
||||
return
|
||||
}
|
||||
tk.setColorWindowTitle()
|
||||
rect := tk.gocuiSize
|
||||
rect.w1 = rect.w0 + tk.full.Width() + 1
|
||||
// rect.h1 = rect.h0 + 1
|
||||
me.baseGui.SetView(tk.v.Name(), rect.w0, rect.h0, rect.w1, rect.h1, 0)
|
||||
me.baseGui.SetView(tk.v.Name(), rect.w0-1, rect.h0, rect.w1+1, rect.h1, 0)
|
||||
tk.v.Clear()
|
||||
f := "%-" + fmt.Sprintf("%d", tk.full.Width()-3) + "s %s"
|
||||
f := " %-" + fmt.Sprintf("%d", tk.full.Width()-3) + "s %s"
|
||||
// tmp := tk.node.GetLabel() + " " + tk.v.Name() + " " + f
|
||||
tmp := tk.node.GetLabel()
|
||||
labelN := fmt.Sprintf(f, tmp, "XX")
|
||||
labelN := fmt.Sprintf(f, tmp, "X")
|
||||
tk.v.WriteString(labelN)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue