Skip to content

Commit 9bbab6a

Browse files
Fix ImageView
1 parent 68b6ff3 commit 9bbab6a

File tree

1 file changed

+14
-14
lines changed
  • internal_filesystem/apps/com.micropythonos.imageview/assets

1 file changed

+14
-14
lines changed

internal_filesystem/apps/com.micropythonos.imageview/assets/imageview.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import gc
22
import os
33

4-
from mpos import Activity, smooth_show, smooth_hide, DisplayMetrics
4+
from mpos import Activity, WidgetAnimator, DisplayMetrics
55

66
class 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

Comments
 (0)