Skip to content

Migration to newer egui 0.34 from 0.33#3

Merged
ehsan18t merged 4 commits intomainfrom
migration/egui-0.34
Mar 30, 2026
Merged

Migration to newer egui 0.34 from 0.33#3
ehsan18t merged 4 commits intomainfrom
migration/egui-0.34

Conversation

@ehsan18t
Copy link
Copy Markdown
Owner

Description

This pull request introduces several improvements and updates across the codebase, focusing on modernizing dependencies, enhancing the display output formatting, and refactoring the GUI code to align with recent changes in the eframe/egui framework. The most significant changes include updating dependencies, refactoring display section formatting for consistency, and adapting the GUI logic to the new eframe API.

Dependency Updates:

  • Upgraded eframe, egui_extras, and egui-phosphor to their latest versions in Cargo.toml to ensure compatibility and access to new features. [1] [2]

Display Formatting Improvements:

  • Introduced section_divider and box_header_line helper functions in src/display.rs for consistent section headers and box titles, replacing hardcoded strings throughout the status and summary outputs.
  • Refactored all section headings in the display output to use these new helper functions, improving maintainability and visual consistency. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
  • Added comprehensive tests for the new formatting helpers, ensuring correct width, inclusion of titles, and robustness with long titles.

GUI Refactoring for eframe 0.34:

  • Updated the main app lifecycle to use the new logic and ui methods instead of the deprecated update method, and refactored related functions and documentation accordingly. [1] [2] [3] [4] [5] [6] [7] [8]
  • Adjusted theme configuration to use set_global_style and global_style in line with the latest egui API.

Integration and Settings Handling:

  • Simplified tray and autostart integration: the tray handle is now synchronized only when the minimize-to-tray setting changes, and autostart registry writes are handled directly by the settings panel.

Miscellaneous:

  • Added a new .github/hooks/context-mode.json file to define pre- and post-tool use hooks for VSCode Copilot integration.

These changes collectively modernize the codebase, improve output clarity, and ensure compatibility with the latest dependencies.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor (no functional changes)
  • Documentation update
  • CI / build change

Related Issues

N/A

Checklist

  • cargo fmt — code is formatted
  • cargo clippy — no lint errors (deny level)
  • cargo test — all tests pass
  • cargo build --release — release build succeeds
  • cargo doc — documentation builds without warnings
  • Documentation updated (README, help text, guides) if behaviour changed
  • Commit messages follow Conventional Commits format

Testing

Stability checks passed: formatting, clippy, tests, and benchmarks.Provided a simplified, release-note-ready changelog in short bullet points as requested.

Screenshots / Output

N/A

Changelogs

  • Upgraded to egui 0.34
  • Improved GUI behavior for cleaner layout and better process-name display.
  • Fixed status display text formatting and unified section titles using shared constants.
  • Fixed autostart settings flow by removing duplicate registry writes and keeping import sync correct.

…cated APIs

- Upgrade egui-phosphor 0.11 -> 0.12 to resolve epaint version conflict

- Split eframe::App::update into logic() (non-UI state) + ui() (rendering)

- Replace SidePanel::left().show(ctx) with Panel::left().show_inside(ui)

- Replace CentralPanel::show(ctx) with CentralPanel::show_inside(ui)

- Rename ctx.style()/set_style() to ctx.global_style()/set_global_style()

- Simplify ui.ctx().open_url/animate_bool via Ui -> Context Deref

- Update threading model docs and all update() references to logic()
- Use ScrollArea::content_margin to replace inner Frame padding wrapper

- Add Label::truncate + show_tooltip_when_elided for process names

- Font hinting (skrifa) and ScrollArea edge fading are automatic
- Fix status box header typo: '-System Status' -> '- System Status'

- Replace 11 hardcoded section header strings with strings::cli constants

- Add section_divider() and box_header_line() helpers for consistent formatting

- Add tests for new helpers (width, centering, long title saturation)

- Eliminates 12 previously-dead string constants in strings::cli that were

  defined but never referenced (survived dead_code lint via lib.rs pub API)
When the user toggled autostart, both draw_integration() in settings.rs

and sync_integration_settings() in app.rs called set_autostart() on the

same frame - a redundant registry write.

- Remove autostart logic from sync_integration_settings() (settings.rs

  already handles it with error feedback and rollback)

- Add autostart sync after settings import in draw_backup() so imported

  auto_start preferences are still applied to the registry

- Startup sync in MagicXApp::new() remains (ensures exe path is current)
@ehsan18t ehsan18t merged commit 7a0e532 into main Mar 30, 2026
2 checks passed
@ehsan18t ehsan18t deleted the migration/egui-0.34 branch March 30, 2026 18:51
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.

1 participant