Skip to content

Commit

Permalink
fixup! refactor(core): improve render_text behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
matejcik committed Jan 4, 2021
1 parent 02ca00d commit a83f110
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/trezor/ui/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def has_more_content(self) -> bool:
def next_line(self) -> bool:
"""Advance the span to point to contents of the next line.
Returns True if the rendered should make newline afterwards, False if this is
Returns True if the renderer should make newline afterwards, False if this is
the end of the text.
Within the renderer, we use this as:
Expand Down Expand Up @@ -253,7 +253,8 @@ def render_text(
if item is BR or item is BR_HALF:
# line break or half-line break
if offset_y > offset_y_max:
ui.display.text(offset_x, offset_y, "...", ui.BOLD, ui.GREY, bg)
if render_page_overflow:
ui.display.text(offset_x, offset_y, "...", ui.BOLD, ui.GREY, bg)
return
offset_x = INITIAL_OFFSET_X
offset_y += TEXT_LINE_HEIGHT if item is BR else TEXT_LINE_HEIGHT_HALF
Expand Down

0 comments on commit a83f110

Please sign in to comment.