summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
Diffstat (limited to 'window.go')
-rw-r--r--window.go14
1 files changed, 4 insertions, 10 deletions
diff --git a/window.go b/window.go
index 298d3ab..21d6cd8 100644
--- a/window.go
+++ b/window.go
@@ -24,7 +24,8 @@ func (tk *guiWidget) setTitle(s string) {
me.baseGui.SetView(tk.v.Name(), rect.w0, rect.h0, rect.w1, rect.h1, 0)
tk.v.Clear()
f := "%-" + fmt.Sprintf("%d", tk.full.Width()-3) + "s %s"
- tmp := tk.node.GetLabel() + " " + tk.v.Name() + " " + f
+ // tmp := tk.node.GetLabel() + " " + tk.v.Name() + " " + f
+ tmp := tk.node.GetLabel()
labelN := fmt.Sprintf(f, tmp, "XX")
tk.v.WriteString(labelN)
}
@@ -41,7 +42,7 @@ func (tk *guiWidget) redrawWindow(w int, h int) {
tk.gocuiSize.w0 = w
tk.gocuiSize.h0 = h
tk.gocuiSize.w1 = w + len(tk.node.GetLabel())
- tk.labelN = tk.node.GetLabel() + " XX"
+ tk.labelN = tk.node.GetLabel() // could set XX here also but don't have final size of window yet
tk.force.w0 = w
tk.force.w1 = w
tk.force.h0 = h
@@ -112,14 +113,7 @@ func (tk *guiWidget) redrawWindow(w int, h int) {
tk.hideWidgets()
tk.showWidgets()
- /*
- tk.gocuiSize.w1 = tk.gocuiSize.w0 + tk.full.Width()
- f := "%-" + fmt.Sprintf("%d", tk.full.Width()) + "s %s"
- tk.labelN = fmt.Sprintf(f, tk.node.GetLabel(), "XX")
- log.Info("f =", f)
- log.Info("label =", tk.labelN)
- tk.dumpWidget(fmt.Sprintf("label"))
- */
+ // draw the window title
tk.setTitle(tk.node.GetLabel() + " jwc")
}