mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-23 07:58:09 +00:00
trezor/ui/scroll: add Scrollbar widget
This commit is contained in:
parent
72591e053a
commit
fda9f584e8
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user