diff --git a/internal_filesystem/apps/com.micropythonos.imageview/assets/imageview.py b/internal_filesystem/apps/com.micropythonos.imageview/assets/imageview.py index bc368145..9a2cbd3e 100644 --- a/internal_filesystem/apps/com.micropythonos.imageview/assets/imageview.py +++ b/internal_filesystem/apps/com.micropythonos.imageview/assets/imageview.py @@ -1,7 +1,7 @@ import gc import os -from mpos import Activity, smooth_show, smooth_hide, DisplayMetrics +from mpos import Activity, WidgetAnimator, DisplayMetrics class ImageView(Activity): @@ -102,9 +102,9 @@ class ImageView(Activity): def no_image_mode(self): self.label.set_text(f"No images found in {self.imagedir}...") - smooth_hide(self.prev_button) - smooth_hide(self.delete_button) - smooth_hide(self.next_button) + WidgetAnimator.smooth_hide(self.prev_button) + WidgetAnimator.smooth_hide(self.delete_button) + WidgetAnimator.smooth_hide(self.next_button) def show_prev_image(self, event=None): print("showing previous image...") @@ -131,21 +131,21 @@ class ImageView(Activity): def stop_fullscreen(self): print("stopping fullscreen") - smooth_show(self.label) - smooth_show(self.prev_button) - smooth_show(self.delete_button) - #smooth_show(self.play_button) + WidgetAnimator.smooth_show(self.label) + WidgetAnimator.smooth_show(self.prev_button) + WidgetAnimator.smooth_show(self.delete_button) + #WidgetAnimator.smooth_show(self.play_button) self.play_button.add_flag(lv.obj.FLAG.HIDDEN) # make it not accepting focus - smooth_show(self.next_button) + WidgetAnimator.smooth_show(self.next_button) def start_fullscreen(self): print("starting fullscreen") - smooth_hide(self.label) - smooth_hide(self.prev_button, hide=False) - smooth_hide(self.delete_button, hide=False) - #smooth_hide(self.play_button, hide=False) + WidgetAnimator.smooth_hide(self.label) + WidgetAnimator.smooth_hide(self.prev_button, hide=False) + WidgetAnimator.smooth_hide(self.delete_button, hide=False) + #WidgetAnimator.smooth_hide(self.play_button, hide=False) self.play_button.remove_flag(lv.obj.FLAG.HIDDEN) # make it accepting focus - smooth_hide(self.next_button, hide=False) + WidgetAnimator.smooth_hide(self.next_button, hide=False) self.unfocus() # focus on the invisible center button, not previous or next def show_prev_image_if_fullscreen(self, event=None):