File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3187,6 +3187,12 @@ def on_click(self, event_obj):
31873187
31883188
31893189class BacklightSetting (AnimScreen ):
3190+ _is_visible = False
3191+
3192+ @classmethod
3193+ def page_is_visible (cls ) -> bool :
3194+ return cls ._is_visible
3195+
31903196 def __init__ (self , prev_scr = None ):
31913197 if not hasattr (self , "_init" ):
31923198 self ._init = True
@@ -3196,6 +3202,8 @@ def __init__(self, prev_scr=None):
31963202 prev_scr = prev_scr , title = _ (i18n_keys .TITLE__BRIGHTNESS ), nav_back = True
31973203 )
31983204
3205+ self .__class__ ._is_visible = True
3206+
31993207 self .current_brightness = device .get_brightness ()
32003208 self .temp_brightness = self .current_brightness
32013209 self .container = ContainerFlexCol (self .content_area , self .title )
@@ -3241,6 +3249,7 @@ def eventhandler(self, event_obj):
32413249 event = event_obj .code
32423250 target = event_obj .get_target ()
32433251 if event == lv .EVENT .CLICKED :
3252+ self .__class__ ._is_visible = False
32443253 if isinstance (target , lv .imgbtn ):
32453254 if target == self .nav_back .nav_btn :
32463255 if self .temp_brightness != self .current_brightness :
Original file line number Diff line number Diff line change @@ -177,7 +177,10 @@ def lcd_resume(timeouts_ms: int | None = None) -> bool:
177177 uart .ctrl_wireless_charge (False )
178178 if display .backlight () != device .get_brightness () or timeouts_ms :
179179 global AUTO_POWER_OFF
180- display .backlight (device .get_brightness ())
180+ from trezor .lvglui .scrs .homescreen import BacklightSetting
181+
182+ if not BacklightSetting .page_is_visible ():
183+ display .backlight (device .get_brightness ())
181184 AUTO_POWER_OFF = False
182185 from trezor .lvglui .scrs import fingerprints
183186
You can’t perform that action at this time.
0 commit comments