more on a dark mode
This commit is contained in:
parent
6ac82df949
commit
dd5232fa6b
2
Makefile
2
Makefile
|
@ -9,7 +9,7 @@ vet:
|
|||
@echo this go plugin builds okay
|
||||
|
||||
gocui:
|
||||
GO111MODULE=off go build -v -work -buildmode=plugin -o gocui.so \
|
||||
GO111MODULE=off go build -v -buildmode=plugin -o gocui.so \
|
||||
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||
|
||||
install:
|
||||
|
|
27
colorNew.go
27
colorNew.go
|
@ -67,6 +67,25 @@ func (tk *guiWidget) setColorBG() {
|
|||
tk.color.selBg = gocui.AttrNone
|
||||
}
|
||||
|
||||
func (tk *guiWidget) setColorLabel() {
|
||||
if tk.color == nil {
|
||||
tk.color = new(colorT)
|
||||
}
|
||||
if me.dark {
|
||||
tk.color.frame = gocui.AttrNone
|
||||
tk.color.fg = gocui.ColorWhite
|
||||
tk.color.bg = gocui.ColorBlack
|
||||
tk.color.selFg = gocui.ColorWhite
|
||||
tk.color.selBg = gocui.AttrNone
|
||||
return
|
||||
}
|
||||
tk.color.frame = gocui.AttrNone
|
||||
tk.color.fg = gocui.ColorBlack
|
||||
tk.color.bg = gocui.AttrNone
|
||||
tk.color.selFg = gocui.AttrNone
|
||||
tk.color.selBg = gocui.AttrNone
|
||||
}
|
||||
|
||||
func (tk *guiWidget) setColorButtonDense() {
|
||||
if tk.color == nil {
|
||||
tk.color = new(colorT)
|
||||
|
@ -74,7 +93,7 @@ func (tk *guiWidget) setColorButtonDense() {
|
|||
if me.dark {
|
||||
tk.color.frame = gocui.AttrNone
|
||||
tk.color.fg = gocui.ColorBlue
|
||||
tk.color.bg = gocui.AttrNone
|
||||
tk.color.bg = gocui.ColorBlack
|
||||
tk.color.selFg = gocui.ColorWhite
|
||||
tk.color.selBg = gocui.ColorBlue
|
||||
return
|
||||
|
@ -91,9 +110,9 @@ func (tk *guiWidget) setColorButton() {
|
|||
tk.color = new(colorT)
|
||||
}
|
||||
if me.dark {
|
||||
tk.color.frame = gocui.ColorBlue
|
||||
tk.color.fg = gocui.AttrNone
|
||||
tk.color.bg = gocui.AttrNone
|
||||
tk.color.frame = gocui.ColorBlack
|
||||
tk.color.fg = gocui.ColorBlue
|
||||
tk.color.bg = gocui.ColorBlack
|
||||
tk.color.selFg = gocui.ColorWhite
|
||||
tk.color.selBg = gocui.ColorBlue
|
||||
return
|
||||
|
|
|
@ -47,7 +47,6 @@ func addWidget(n *tree.Node) {
|
|||
case widget.Window:
|
||||
tk.frame = false
|
||||
tk.labelN = tk.GetText() + " X"
|
||||
// tk.color = &colorWindow
|
||||
tk.setColor(&colorWindow)
|
||||
me.newWindowTrigger <- tk
|
||||
redoWindows(0, 0)
|
||||
|
@ -66,12 +65,10 @@ func addWidget(n *tree.Node) {
|
|||
tk.setColorButton()
|
||||
return
|
||||
case widget.Checkbox:
|
||||
// tk.color = &colorCheckbox
|
||||
tk.setColorInput()
|
||||
tk.labelN = "X " + n.State.Label
|
||||
return
|
||||
case widget.Dropdown:
|
||||
// tk.color = &colorDropdown
|
||||
tk.setColorInput()
|
||||
return
|
||||
case widget.Textbox:
|
||||
|
@ -93,11 +90,10 @@ func addWidget(n *tree.Node) {
|
|||
setFake(n)
|
||||
return
|
||||
case widget.Group:
|
||||
// tk.color = &colorLabel
|
||||
tk.frame = false
|
||||
return
|
||||
case widget.Label:
|
||||
tk.color = &colorLabel
|
||||
tk.setColorLabel()
|
||||
tk.frame = false
|
||||
return
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue