mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-29 19:08:12 +00:00
trezor.ui: send -> touch
This commit is contained in:
parent
dc87e14334
commit
3cb89f3ae7
@ -58,7 +58,7 @@ class HoldToConfirmDialog(Widget):
|
|||||||
self.content.render()
|
self.content.render()
|
||||||
self.button.render()
|
self.button.render()
|
||||||
|
|
||||||
def send(self, event, pos):
|
def touch(self, event, pos):
|
||||||
button = self.button
|
button = self.button
|
||||||
was_started = button.state & BTN_STARTED
|
was_started = button.state & BTN_STARTED
|
||||||
button.touch(event, pos)
|
button.touch(event, pos)
|
||||||
@ -71,7 +71,7 @@ class HoldToConfirmDialog(Widget):
|
|||||||
if self.loader.stop():
|
if self.loader.stop():
|
||||||
return CONFIRMED
|
return CONFIRMED
|
||||||
if self.content is not None:
|
if self.content is not None:
|
||||||
return self.content.send(event, pos)
|
return self.content.touch(event, pos)
|
||||||
|
|
||||||
async def __iter__(self):
|
async def __iter__(self):
|
||||||
return await loop.Wait((self._render_loop(), self._event_loop()))
|
return await loop.Wait((self._render_loop(), self._event_loop()))
|
||||||
@ -85,6 +85,6 @@ class HoldToConfirmDialog(Widget):
|
|||||||
def _event_loop(self):
|
def _event_loop(self):
|
||||||
while True:
|
while True:
|
||||||
event, *pos = yield loop.Select(loop.TOUCH)
|
event, *pos = yield loop.Select(loop.TOUCH)
|
||||||
result = self.send(event, pos)
|
result = self.touch(event, pos)
|
||||||
if result is not None:
|
if result is not None:
|
||||||
return result
|
return result
|
||||||
|
@ -29,6 +29,3 @@ class Text(ui.Widget):
|
|||||||
style = item
|
style = item
|
||||||
else:
|
else:
|
||||||
fg = item
|
fg = item
|
||||||
|
|
||||||
def send(self, event, pos):
|
|
||||||
pass
|
|
||||||
|
Loading…
Reference in New Issue
Block a user