Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFT-2227: fixed invisible scrollbar on long text pages #344

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ports/stm32/boards/Passport/modules/pages/long_text_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
from styles.style import Stylize
from views import Label, View, Icon
from pages import Page
from styles.colors import TEXT_GREY
from styles.colors import TEXT_GREY, SCROLLBAR_BG_COLOR
import microns
import passport


class LongTextPage(Page):
Expand Down Expand Up @@ -54,6 +55,10 @@ def __init__(self,
default.flex_fill()
default.pad(left=12, right=12)

with Stylize(self.container, selector=lv.PART.SCROLLBAR) as scrollbar:
if not passport.IS_COLOR:
scrollbar.bg_color(SCROLLBAR_BG_COLOR)

if self.text is not None:
self.text = Label(text=self.text)

Expand Down