Skip to content

Commit a6830ef

Browse files
ImageView: comments
1 parent 4f2324c commit a6830ef

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def onCreate(self):
4040
prev_label = lv.label(self.prev_button)
4141
prev_label.set_text(lv.SYMBOL.LEFT)
4242
prev_label.set_style_text_font(lv.font_montserrat_16, lv.PART.MAIN)
43+
44+
# Invisible button, just for defocusing the prev and next buttons:
4345
self.play_button = lv.button(screen)
4446
self.play_button.align(lv.ALIGN.BOTTOM_MID,0,0)
4547
self.play_button.set_style_opa(lv.OPA.TRANSP, lv.PART.MAIN)
@@ -167,12 +169,10 @@ def unfocus(self):
167169
if not focusgroup:
168170
print("WARNING: imageview.py could not get default focus group")
169171
return
170-
print("got focus group")
171-
# group.focus_obj(self.play_button) would be better but appears missing?!
172172
focused = focusgroup.get_focused()
173-
print("got focus button")
174-
#focused.remove_state(lv.STATE.FOCUSED) # this doesn't seem to work to remove focus
175173
if focused:
174+
print(f"got focus button: {focused}")
175+
#focused.remove_state(lv.STATE.FOCUSED) # this doesn't seem to work to remove focus
176176
print("checking which button is focused")
177177
if focused == self.next_button:
178178
print("next is focused")

0 commit comments

Comments
 (0)