Skip to content

fix: complete LVGL 9.x migration for simulator#341

Open
al-munazzim wants to merge 1 commit intocryptoadvance:micropython-upgradefrom
al-munazzim:micropython-upgrade-python-fixes
Open

fix: complete LVGL 9.x migration for simulator#341
al-munazzim wants to merge 1 commit intocryptoadvance:micropython-upgradefrom
al-munazzim:micropython-upgrade-python-fixes

Conversation

@al-munazzim
Copy link
Contributor

Summary

  • Complete LVGL 9.x API migration for simulator and core GUI components
  • Updates event callbacks, style API, alignment methods, flag constants, and font references across 12 source files
  • The scanner fix and additional python/lvgl fixes were already present in micropython-upgrade; this PR adds the remaining simulator migration changes

Changes

  • Event callbacks: (obj, event) -> (event) with event.get_code()
  • add_event_cb requires (callback, filter, user_data) signature
  • lv.btn -> lv.button, lv.page -> lv.obj
  • Style API: removed style_copy, use init() + set_*()
  • Flags: OBJ_FLAG -> obj.FLAG, clear_flag -> remove_flag
  • Alignment: align() -> align_to(), removed IN_ prefix
  • Label: LONG.BREAK -> LONG_MODE.WRAP
  • Fonts: roboto -> montserrat

Test plan

  • Verify simulator builds and runs with LVGL 9.x
  • Test QR scanner settings screen (HostSettings)
  • Test device settings screen (DevSettings)
  • Verify keyboard, mnemonic, modal, and transaction screens render correctly

🤖 Generated with Claude Code

- Event callbacks: (obj, event) -> (event) with event.get_code()
- add_event_cb requires (callback, filter, user_data)
- lv.btn -> lv.button, lv.page -> lv.obj
- Style API: removed style_copy, use init() + set_*()
- Flags: OBJ_FLAG -> obj.FLAG, clear_flag -> remove_flag
- Alignment: align() -> align_to(), removed IN_ prefix
- Label: LONG.BREAK -> LONG_MODE.WRAP
- Fonts: roboto -> montserrat
- Added migration reference doc

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants