might as well test dark/light mode

This commit is contained in:
Jeff Carr 2025-02-07 02:49:11 -06:00
parent 0b67b198bd
commit 6ac82df949
2 changed files with 20 additions and 0 deletions

View File

@ -9,6 +9,25 @@ import (
"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'
func (tk *guiWidget) setColorWindowTitle() {
if tk.color == nil {

View File

@ -78,6 +78,7 @@ func (tk *guiWidget) redrawWindow(w int, h int) {
tk.windowFrame.full.w1 = r.w1 + 1
tk.windowFrame.full.h0 = tk.force.h0 + 2
tk.windowFrame.full.h1 = r.h1 + 1
tk.windowFrame.setColorWindowFrame()
tk.windowFrame.Hide()
tk.windowFrame.Show()