From 9f23af95c631b210ed417fb07b8358881e61551c Mon Sep 17 00:00:00 2001 From: guowei0105 Date: Fri, 17 Jan 2025 15:50:26 +0800 Subject: [PATCH] Adjust the animation toggle to be enabled by default --- core/src/storage/device.py | 6 +++++- core/src/trezor/lvglui/scrs/common.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/storage/device.py b/core/src/storage/device.py index 0a0177144..c3ee56231 100644 --- a/core/src/storage/device.py +++ b/core/src/storage/device.py @@ -623,7 +623,11 @@ def set_tap_awake_enable(enable: bool) -> None: def is_animation_enabled() -> bool: global _ANIMATION_VALUE if _ANIMATION_VALUE is None: - _ANIMATION_VALUE = common.get_bool(_NAMESPACE, _ANIMATION, public=True) + animation_enabled = common.get(_NAMESPACE, _ANIMATION, public=True) + if animation_enabled == common._FALSE_BYTE: + _ANIMATION_VALUE = False + else: + _ANIMATION_VALUE = True return _ANIMATION_VALUE diff --git a/core/src/trezor/lvglui/scrs/common.py b/core/src/trezor/lvglui/scrs/common.py index 84ebcaaa7..db16b7704 100644 --- a/core/src/trezor/lvglui/scrs/common.py +++ b/core/src/trezor/lvglui/scrs/common.py @@ -84,7 +84,7 @@ def __init__(self, prev_scr=None, **kwargs): if kwargs.get("nav_back", False): self.nav_back = Navigation(self.content_area) - self.nav_back.align(lv.ALIGN.TOP_LEFT, 12, 44) + self.nav_back.align(lv.ALIGN.TOP_LEFT, 0, 44) self.add_event_cb(self.on_nav_back, lv.EVENT.GESTURE, None) if "title" in kwargs: self.title = ScreenTitle(self.content_area, None, (), kwargs["title"])