1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Widget#focus now a thing

Widgets can inform whether or not they should get tab focus.

Widgets that provide additional functionality should return true.

Widgets that have no extra capability should return false.

This allows the FocusTracker to only tab through and focus on widgets
for which it provides value.
This commit is contained in:
Chris Cummer
2018-04-28 23:41:51 -07:00
parent 42559c396d
commit 037c90db85
17 changed files with 39 additions and 21 deletions

View File

@@ -23,7 +23,7 @@ type Widget struct {
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" 📝 Todo ", "todo"),
TextWidget: wtf.NewTextWidget(" 📝 Todo ", "todo", true),
FilePath: Config.UString("wtf.mods.todo.filename"),
list: &List{selected: -1},