11import gc
22import os
33
4- from mpos import Activity , smooth_show , smooth_hide , DisplayMetrics
4+ from mpos import Activity , WidgetAnimator , DisplayMetrics
55
66class ImageView (Activity ):
77
@@ -102,9 +102,9 @@ def onStop(self, screen):
102102
103103 def no_image_mode (self ):
104104 self .label .set_text (f"No images found in { self .imagedir } ..." )
105- smooth_hide (self .prev_button )
106- smooth_hide (self .delete_button )
107- smooth_hide (self .next_button )
105+ WidgetAnimator . smooth_hide (self .prev_button )
106+ WidgetAnimator . smooth_hide (self .delete_button )
107+ WidgetAnimator . smooth_hide (self .next_button )
108108
109109 def show_prev_image (self , event = None ):
110110 print ("showing previous image..." )
@@ -131,21 +131,21 @@ def toggle_fullscreen(self, event=None):
131131
132132 def stop_fullscreen (self ):
133133 print ("stopping fullscreen" )
134- smooth_show (self .label )
135- smooth_show (self .prev_button )
136- smooth_show (self .delete_button )
137- #smooth_show(self.play_button)
134+ WidgetAnimator . smooth_show (self .label )
135+ WidgetAnimator . smooth_show (self .prev_button )
136+ WidgetAnimator . smooth_show (self .delete_button )
137+ #WidgetAnimator. smooth_show(self.play_button)
138138 self .play_button .add_flag (lv .obj .FLAG .HIDDEN ) # make it not accepting focus
139- smooth_show (self .next_button )
139+ WidgetAnimator . smooth_show (self .next_button )
140140
141141 def start_fullscreen (self ):
142142 print ("starting fullscreen" )
143- smooth_hide (self .label )
144- smooth_hide (self .prev_button , hide = False )
145- smooth_hide (self .delete_button , hide = False )
146- #smooth_hide(self.play_button, hide=False)
143+ WidgetAnimator . smooth_hide (self .label )
144+ WidgetAnimator . smooth_hide (self .prev_button , hide = False )
145+ WidgetAnimator . smooth_hide (self .delete_button , hide = False )
146+ #WidgetAnimator. smooth_hide(self.play_button, hide=False)
147147 self .play_button .remove_flag (lv .obj .FLAG .HIDDEN ) # make it accepting focus
148- smooth_hide (self .next_button , hide = False )
148+ WidgetAnimator . smooth_hide (self .next_button , hide = False )
149149 self .unfocus () # focus on the invisible center button, not previous or next
150150
151151 def show_prev_image_if_fullscreen (self , event = None ):
0 commit comments