summaryrefslogtreecommitdiff
path: root/widgetAdd.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-03-25 09:31:40 -0500
committerJeff Carr <[email protected]>2025-03-25 13:17:00 -0500
commitaaebb4c5d993aafe8b290055296c9aaa1fb1ea93 (patch)
tree2bbc22b83c112eaa05de852e1505ebe6bfbca24f /widgetAdd.go
parent36514cbb6818dd06e13b2dff20fa4f0ac67ce545 (diff)
table headers identified. ready for sorting
Diffstat (limited to 'widgetAdd.go')
-rw-r--r--widgetAdd.go20
1 files changed, 11 insertions, 9 deletions
diff --git a/widgetAdd.go b/widgetAdd.go
index 6bb459b..0686c86 100644
--- a/widgetAdd.go
+++ b/widgetAdd.go
@@ -41,17 +41,14 @@ func addWidget(n *tree.Node) {
switch n.WidgetType {
case widget.Root:
log.Log(INFO, "setStartWH() rootNode w.id =", n.WidgetId, "w.name", n.String())
- // tk.color = &colorRoot
setFake(n)
return
case widget.Flag:
- // tk.color = &colorFlag
setFake(n)
return
case widget.Window:
tk.frame = false
tk.labelN = tk.GetText() + " X"
- // tk.setColor(&colorWindow)
me.newWindowTrigger <- tk
redoWindows(0, 0)
return
@@ -62,7 +59,6 @@ func addWidget(n *tree.Node) {
tk.isFake = true
return
case widget.Tab:
- // tk.color = &colorTab
return
case widget.Button:
tk.setColorButton()
@@ -81,20 +77,16 @@ func addWidget(n *tree.Node) {
case widget.Textbox:
n.State.Label = ""
tk.labelN = " "
- // tk.color = &colorDropdown
tk.setColorInput()
return
case widget.Combobox:
- // tk.color = &colorCombobox
tk.setColorInput()
return
case widget.Box:
- // tk.color = &colorBox
tk.isFake = true
setFake(n)
return
case widget.Grid:
- // tk.color = &colorGrid
tk.isFake = true
setFake(n)
return
@@ -103,7 +95,17 @@ func addWidget(n *tree.Node) {
tk.frame = false
return
case widget.Label:
- tk.setColorLabel()
+ if tk.node.InTable() {
+ if tk.node.State.AtH == 0 {
+ // this is the table header
+ tk.setColorLabelTable()
+ } else {
+ // todo: highlight the whole table row
+ tk.setColorLabel()
+ }
+ } else {
+ tk.setColorLabel()
+ }
tk.frame = false
return
default: