dark mode is okay

This commit is contained in:
Jeff Carr 2025-02-07 03:19:36 -06:00
parent dd5232fa6b
commit 6c522a4b27
2 changed files with 16 additions and 2 deletions

13
help.go
View File

@ -95,6 +95,14 @@ func setThingsOnTop() {
me.baseGui.SetViewOnTop("help")
}
if me.dark {
me.stdout.tk.v.FgColor = gocui.ColorWhite
me.stdout.tk.v.BgColor = gocui.ColorBlack
} else {
me.stdout.tk.v.FgColor = gocui.ColorBlack
me.stdout.tk.v.BgColor = gocui.AttrNone
}
if me.stdout.outputOnTop {
me.baseGui.SetViewOnTop("msg")
} else {
@ -108,6 +116,11 @@ func setBottomBG() {
rootTK := me.treeRoot.TK.(*guiWidget)
if tk := rootTK.findBG(); tk != nil {
// log.Info("found BG. setting to bottom", tk.cuiName)
if me.dark {
tk.v.BgColor = gocui.ColorBlack
} else {
tk.v.BgColor = gocui.ColorWhite
}
tk.v.Clear()
me.baseGui.SetViewOnBottom(tk.cuiName)
w, h := me.baseGui.Size()

View File

@ -80,16 +80,17 @@ func addWidget(n *tree.Node) {
tk.color = &colorCombobox
return
case widget.Box:
tk.color = &colorBox
// tk.color = &colorBox
tk.isFake = true
setFake(n)
return
case widget.Grid:
tk.color = &colorGrid
// tk.color = &colorGrid
tk.isFake = true
setFake(n)
return
case widget.Group:
tk.setColorLabel()
tk.frame = false
return
case widget.Label: