mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-28 22:33:59 -06:00
ui: hide cursor in focused buttons
This commit is contained in:
@@ -2,6 +2,8 @@ import typing as T
|
|||||||
|
|
||||||
import urwid
|
import urwid
|
||||||
|
|
||||||
|
_MAGIC = 999 # where to display the cursor (high value = don't display it)
|
||||||
|
|
||||||
|
|
||||||
class CustomButton(urwid.Button):
|
class CustomButton(urwid.Button):
|
||||||
def __init__(
|
def __init__(
|
||||||
@@ -16,7 +18,7 @@ class CustomButton(urwid.Button):
|
|||||||
urwid.Columns(
|
urwid.Columns(
|
||||||
[
|
[
|
||||||
("pack", urwid.Text("< ")),
|
("pack", urwid.Text("< ")),
|
||||||
urwid.SelectableIcon([label], 0),
|
urwid.SelectableIcon([label], _MAGIC),
|
||||||
(
|
(
|
||||||
"pack",
|
"pack",
|
||||||
urwid.Text(f"[{hint}]" if hint else "", align="right"),
|
urwid.Text(f"[{hint}]" if hint else "", align="right"),
|
||||||
|
|||||||
Reference in New Issue
Block a user