From 0a6027244078ce36de31af64dfd01e561420d4e5 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 12 Feb 2025 00:19:15 -0600 Subject: working on button disable --- treeDraw.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'treeDraw.go') diff --git a/treeDraw.go b/treeDraw.go index 1f3ab11..52fb416 100644 --- a/treeDraw.go +++ b/treeDraw.go @@ -182,6 +182,19 @@ func (tk *guiWidget) drawView() { } } + switch tk.node.WidgetType { + case widget.Button: + if tk.node.IsEnabled() { + if tk.isWindowDense() && tk.isInGrid() { + tk.setColorButtonDense() + } else { + tk.setColorButton() + } + } else { + tk.setColorDisable() + } + default: + } // if you don't do this here, it will be black & white only if tk.color != nil { tk.v.FrameColor = tk.color.frame -- cgit v1.2.3