diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2018-02-22 23:15:13 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2018-02-22 23:15:13 +0100 |
commit | 4bca49f807544bd948a5f5f78e3787411252650f (patch) | |
tree | 5014acfd25b349488fd8116dccccac714bedb65d /style.go | |
download | poe-4bca49f807544bd948a5f5f78e3787411252650f.tar.gz poe-4bca49f807544bd948a5f5f78e3787411252650f.tar.bz2 poe-4bca49f807544bd948a5f5f78e3787411252650f.zip |
first commit
Diffstat (limited to 'style.go')
-rw-r--r-- | style.go | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/style.go b/style.go new file mode 100644 index 0000000..57debbf --- /dev/null +++ b/style.go @@ -0,0 +1,45 @@ +package main + +import "github.com/gdamore/tcell" + +var ( + // body is the main editing buffer + bodyStyle tcell.Style + bodyCursorStyle tcell.Style + bodyHilightStyle tcell.Style + + // tag is the window tag line above the body + tagStyle tcell.Style + tagCursorStyle tcell.Style + tagHilightStyle tcell.Style + + // vertline is the vertical line separating columns + vertlineStyle tcell.Style + + // unprintable rune + unprintableStyle tcell.Style +) + +// InitStyles initializes the different styles (colors for background/foreground). +func InitStyles() { + bodyStyle = tcell.StyleDefault. + Background(tcell.NewHexColor(0xffffea)). + Foreground(tcell.ColorBlack) + bodyCursorStyle = bodyStyle. + Background(tcell.NewHexColor(0xeaea9e)) + bodyHilightStyle = bodyStyle. + Background(tcell.NewHexColor(0xa6a65a)) + unprintableStyle = bodyStyle. + Foreground(tcell.ColorRed) + + tagStyle = tcell.StyleDefault. + Background(tcell.NewHexColor(0xeaffff)). + Foreground(tcell.ColorBlack) + tagCursorStyle = tagStyle. + Background(tcell.NewHexColor(0x8888cc)). + Foreground(tcell.ColorBlack) + tagHilightStyle = tagStyle. + Background(tcell.NewHexColor(0x8888cc)) + + vertlineStyle = bodyStyle +} |