1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-27 01:48:17 +00:00

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

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)