ui: change buttons appearance

This commit is contained in:
rr-
2018-11-05 21:04:39 +01:00
parent ec601478dc
commit 3ffeec8892
2 changed files with 9 additions and 3 deletions
+8 -3
View File
@@ -9,14 +9,19 @@ class MenuButton(urwid.Button):
label: str,
*args: T.Any,
hint: T.Optional[str] = None,
**kwargs: T.Any
**kwargs: T.Any,
) -> None:
super().__init__("", *args, **kwargs)
self._w = urwid.AttrMap(
urwid.Columns(
[
urwid.SelectableIcon(["\N{BULLET} ", label], 2),
("pack", urwid.Text(hint or "", align="right")),
("pack", urwid.Text("< ")),
urwid.SelectableIcon([label], 0),
(
"pack",
urwid.Text(f"[{hint}]" if hint else "", align="right"),
),
("pack", urwid.Text(" >")),
]
),
"button",
+1
View File
@@ -158,6 +158,7 @@ class NewGameView(urwid.Pile):
urwid.Padding(
generate_char_name_btn,
left=len(self.char_name_edit.caption),
width=25,
)
),
),