Make TextButtons have a cursor

All of our selectable widgets should have a cursor; if we use
SelectableIcon instead of a plain Text widget as the basis for
the TextButton, we will have one.

Change-Id: I490c7317a2d43727700066918b0b486d1a9cdc6b
This commit is contained in:
James E. Blair 2021-10-08 18:11:10 -07:00
parent 3555a0d211
commit 0f5079ded3
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class TextButton(urwid.Button):
def __init__(self, text, on_press=None, user_data=None):
super(TextButton, self).__init__('', on_press=on_press, user_data=user_data)
self.text = urwid.Text(text)
self.text = urwid.SelectableIcon(text)
self._w = urwid.AttrMap(self.text, None, focus_map='focused')
class FixedButton(urwid.Button):