mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-05-05 15:45:08 -04:00
Use urwid constants for widgets instead of string equivalents
* Reduce `DeprecationWarning` amount: `get_focus` -> `focus_position` for `Frame` and `focus` for `Pile` `set_focus` -> use property `focus_position`
This commit is contained in:
parent
d856f3fd28
commit
77eca5d23e
11 changed files with 524 additions and 245 deletions
|
@ -4,7 +4,6 @@ import random
|
|||
import time
|
||||
from urwid.util import is_mouse_press
|
||||
from urwid.text_layout import calc_coords
|
||||
import re
|
||||
|
||||
DEFAULT_FG_DARK = "ddd"
|
||||
DEFAULT_FG_LIGHT = "222"
|
||||
|
@ -162,7 +161,7 @@ def parse_line(line, state, url_delegate):
|
|||
else:
|
||||
tw = urwid.Text(o, align=state["align"])
|
||||
|
||||
widgets.append(("pack", tw))
|
||||
widgets.append((urwid.PACK, tw))
|
||||
else:
|
||||
if o["type"] == "field":
|
||||
fw = o["width"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue