might as well test dark/light mode
This commit is contained in:
parent
0b67b198bd
commit
6ac82df949
19
colorNew.go
19
colorNew.go
|
@ -9,6 +9,25 @@ import (
|
||||||
"github.com/awesome-gocui/gocui"
|
"github.com/awesome-gocui/gocui"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func (tk *guiWidget) setColorWindowFrame() {
|
||||||
|
if tk.color == nil {
|
||||||
|
tk.color = new(colorT)
|
||||||
|
}
|
||||||
|
if me.dark { // use a dark color palette
|
||||||
|
tk.color.frame = gocui.AttrNone
|
||||||
|
tk.color.fg = gocui.ColorBlack
|
||||||
|
tk.color.bg = gocui.ColorBlack
|
||||||
|
tk.color.selFg = gocui.AttrNone
|
||||||
|
tk.color.selBg = gocui.AttrNone
|
||||||
|
return
|
||||||
|
}
|
||||||
|
tk.color.frame = gocui.AttrNone
|
||||||
|
tk.color.fg = gocui.AttrNone
|
||||||
|
tk.color.bg = gocui.AttrNone
|
||||||
|
tk.color.selFg = gocui.AttrNone
|
||||||
|
tk.color.selBg = gocui.AttrNone
|
||||||
|
}
|
||||||
|
|
||||||
// weird. lots of color problems for me on debian sid using the traditional Andy Herzfield 'gnome'
|
// weird. lots of color problems for me on debian sid using the traditional Andy Herzfield 'gnome'
|
||||||
func (tk *guiWidget) setColorWindowTitle() {
|
func (tk *guiWidget) setColorWindowTitle() {
|
||||||
if tk.color == nil {
|
if tk.color == nil {
|
||||||
|
|
|
@ -78,6 +78,7 @@ func (tk *guiWidget) redrawWindow(w int, h int) {
|
||||||
tk.windowFrame.full.w1 = r.w1 + 1
|
tk.windowFrame.full.w1 = r.w1 + 1
|
||||||
tk.windowFrame.full.h0 = tk.force.h0 + 2
|
tk.windowFrame.full.h0 = tk.force.h0 + 2
|
||||||
tk.windowFrame.full.h1 = r.h1 + 1
|
tk.windowFrame.full.h1 = r.h1 + 1
|
||||||
|
tk.windowFrame.setColorWindowFrame()
|
||||||
tk.windowFrame.Hide()
|
tk.windowFrame.Hide()
|
||||||
tk.windowFrame.Show()
|
tk.windowFrame.Show()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue