summaryrefslogtreecommitdiff
path: root/plugin.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-30 03:11:31 -0600
committerJeff Carr <[email protected]>2024-01-30 03:11:31 -0600
commit00a01849189960ecf01314ed23f120aa1c26fbf9 (patch)
treef3daab7ca62d4dd1a8369721a178cf3c5943f45f /plugin.go
parentab1c90e93e05c07641696e1cce93943f8e3a57f9 (diff)
hidden still not working in window redraw
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'plugin.go')
-rw-r--r--plugin.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin.go b/plugin.go
index 774b85d..c8bd88c 100644
--- a/plugin.go
+++ b/plugin.go
@@ -34,6 +34,9 @@ func action(a widget.Action) {
} else {
w.setColor(&colorDisabled)
}
+ if w.hidden {
+ w.SetVisible(false)
+ }
} else {
// this is done to protect the plugin being 'refreshed' with the
// widget binary tree. TODO: find a way to keep them in sync
@@ -41,6 +44,7 @@ func action(a widget.Action) {
a.WidgetId, a.ActionType, a.WidgetType, a.ProgName)
}
case widget.Show:
+ w.node.State.Hidden = false
if w.Visible() {
// widget was already shown
} else {
@@ -49,6 +53,9 @@ func action(a widget.Action) {
}
w.showView()
case widget.Hide:
+ w.node.State.Hidden = true
+ log.Log(NOW, "HIDE HERE. a.State.Hidden =", a.State.Hidden)
+ log.Log(NOW, "HIDE HERE. w.hidden =", w.hidden)
if w.Visible() {
log.Log(INFO, "Setting Visible to false", a.ProgName)
w.SetVisible(false)