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