trezor/ui/scroll: add Scrollbar widget

This commit is contained in:
Jan Pochyla 2017-10-09 15:34:37 +02:00
parent 72591e053a
commit fda9f584e8
1 changed files with 10 additions and 0 deletions

View File

@ -60,3 +60,13 @@ def render_scrollbar(page, page_count):
size, ui.DARK_GREY, ui.BG, 4)
ui.display.bar_radius(x, y + page * padding, size,
size, ui.FG, ui.BG, 4)
class Scrollbar(ui.Widget):
def __init__(self, page, page_count):
self.page = page
self.page_count = page_count
def render(self):
render_scrollbar(self.page, self.page_count)