Skip to content

228 refactor graphics::window into lvgl component#229

Merged
AlixANNERAUD merged 18 commits into
mainfrom
228-refactor-graphicwindow-into-lvgl-component
May 27, 2026
Merged

228 refactor graphics::window into lvgl component#229
AlixANNERAUD merged 18 commits into
mainfrom
228-refactor-graphicwindow-into-lvgl-component

Conversation

@AlixANNERAUD
Copy link
Copy Markdown
Contributor

@AlixANNERAUD AlixANNERAUD commented May 27, 2026

This pull request refactors the codebase to consistently use the new OwnedWindow abstraction in place of the previous Window type across multiple modules. It also modernizes control flow by adopting Rust's let-chaining (if ... && let ...) and improves code readability by simplifying match and event handling patterns. The changes enhance maintainability, safety, and consistency in UI window management and event processing.

Refactoring to OwnedWindow abstraction:

Modernizing control flow and event handling:

  • Adopted Rust's let-chaining (if ... && let ...) for more concise and readable conditional logic in functions like split_host_port and render_cpuinfo_text. [1] [2]
  • Refactored match arms and event handlers to use guard patterns, reducing nesting and improving clarity in event-driven code, especially in the Desk and screen_event_handler implementations. [1] [2] [3] [4] [5]

Code cleanup and minor improvements:

  • Simplified match expressions and removed unnecessary nesting in command dispatch and event handling logic.
  • Reorganized imports and updated usages to align with the new abstractions and code structure. [1] [2]

These changes collectively improve code consistency, readability, and future maintainability by unifying window management and adopting modern Rust idioms.

@AlixANNERAUD AlixANNERAUD linked an issue May 27, 2026 that may be closed by this pull request
@AlixANNERAUD AlixANNERAUD enabled auto-merge (squash) May 27, 2026 20:56
@AlixANNERAUD AlixANNERAUD changed the title 228 refactor graphicwindow into lvgl component 228 refactor graphics::window into lvgl component May 27, 2026
@AlixANNERAUD AlixANNERAUD merged commit 9650bd7 into main May 27, 2026
3 checks passed
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.

Refactor graphics::Window into LVGL component

1 participant