From 2ecd5e4b849a2d4068668de4f1ce1031d6e87642 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Wed, 16 May 2018 17:22:14 -0700 Subject: [PATCH] Closes #44. Cannot tab to disabled widgets. --- _sample_configs/simple_config.yml | 5 +++++ wtf/config_files.go | 5 +++++ wtf/text_widget.go | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/_sample_configs/simple_config.yml b/_sample_configs/simple_config.yml index ea446257..f0fe3be9 100644 --- a/_sample_configs/simple_config.yml +++ b/_sample_configs/simple_config.yml @@ -1,4 +1,9 @@ wtf: + colors: + border: + focusable: darkslateblue + focused: orange + normal: gray grid: columns: [40, 40] rows: [13, 13, 4] diff --git a/wtf/config_files.go b/wtf/config_files.go index 1825084f..ba10b3b7 100644 --- a/wtf/config_files.go +++ b/wtf/config_files.go @@ -108,6 +108,11 @@ func WriteConfigFile() { const simpleConfig = ` wtf: + colors: + border: + focusable: darkslateblue + focused: orange + normal: gray grid: columns: [40, 40] rows: [13, 13, 4] diff --git a/wtf/text_widget.go b/wtf/text_widget.go index 266b2b4f..bf74dba1 100644 --- a/wtf/text_widget.go +++ b/wtf/text_widget.go @@ -61,7 +61,7 @@ func (widget *TextWidget) Enabled() bool { } func (widget *TextWidget) Focusable() bool { - return widget.focusable + return widget.enabled && widget.focusable } func (widget *TextWidget) RefreshInterval() int {