summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--colorNew.go27
-rw-r--r--treeAdd.go6
3 files changed, 25 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 59b21f6..11df1fb 100644
--- a/Makefile
+++ b/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:
diff --git a/colorNew.go b/colorNew.go
index 773bb12..b7b908b 100644
--- a/colorNew.go
+++ b/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
diff --git a/treeAdd.go b/treeAdd.go
index e8e9834..ec1eb4a 100644
--- a/treeAdd.go
+++ b/treeAdd.go
@@ -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: