aboutsummaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2018-02-26 11:14:21 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2018-02-26 11:14:21 +0100
commit0023e0929ac7075cd008e0093de58ddc89efd597 (patch)
tree68e8ab40c955a89ee98e9c667dff12837a58b0fb /window.go
parent0e86accb588445f09b07ec68e6cc62903f9ba7bd (diff)
downloadpoe-0023e0929ac7075cd008e0093de58ddc89efd597.tar.gz
poe-0023e0929ac7075cd008e0093de58ddc89efd597.tar.bz2
poe-0023e0929ac7075cd008e0093de58ddc89efd597.zip
Bulk commit before redesign in another branch.
Diffstat (limited to 'window.go')
-rw-r--r--window.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/window.go b/window.go
index 763acc9..0e85bb7 100644
--- a/window.go
+++ b/window.go
@@ -280,7 +280,7 @@ func (win *Window) Flags() string {
func (win *Window) Resize(x, y, w, h int) {
win.x, win.y, win.w, win.h = x, y, w, h
- win.tagline.Resize(win.x, win.y, win.w, 1)
+ win.tagline.Resize(win.x+3, win.y, win.w-3, 1) // 3 for tagbox
win.body.Resize(win.x, win.y+1, win.w, win.h-1)
}
@@ -320,6 +320,15 @@ func (win *Window) HandleEvent(ev tcell.Event) {
}
func (win *Window) Draw() {
+ // Draw tag square
+ boxstyle := tagSquareStyle
+ if win.body.dirty {
+ boxstyle = tagSquareModifiedStyle
+ }
+ screen.SetContent(win.x, win.y, ' ', nil, boxstyle)
+ screen.SetContent(win.x+1, win.y, ' ', nil, boxstyle)
+ screen.SetContent(win.x+2, win.y, ' ', nil, win.tagline.style)
+
// Tagline
win.tagline.Draw()