Skip to content

New features & Better code health πŸ’–

Choose a tag to compare

@Ariel4545 Ariel4545 released this 09 Jan 17:00
· 2 commits to main since this release
6665d38

🎨 Egon Draw - Update 3 Patch Notes

This update focuses on expanding the toolset with precision features, adding asset support, and introducing session tracking, alongside significant under-the-hood refactoring for better stability.


🌟 New Features

🧲 Magnet Tool

  • What it is: A precision movement tool.
  • How it works: Allows you to drag selected items relative to a reference point (your mouse click). It acts like a magnet, pulling items towards the cursor or moving them with arrow keys.
  • Controls: Toggle with the "Magnet" button. Use Mouse Drag or Arrow Keys for fine adjustments.

πŸ–ΌοΈ Bitmap (Icon) Support

  • What it is: Native support for inserting system bitmaps.
  • Details: Added a dedicated "Add Bitmap" section.
  • Library: Includes standard icons like error, info, question, hourglass, and more.

πŸ“Š Usage Statistics Dashboard

  • What it is: A new popup dashboard to track your drawing session.
  • Metrics Tracked:
    • ⏱️ Session Duration: Tracks active time using a non-blocking background thread.
    • πŸ–ŒοΈ Most Used Tool: See which brush you favor.
    • 🎨 Most Used Color: See your dominant palette.
    • πŸ“ Line Count: Total number of lines drawn.

πŸ–οΈ Edit Color Mode

  • What it is: The ability to modify the color of items after they are drawn.
  • How it works: Click "Edit color", select a new color, and click any item on the canvas to repaint it instantly.

πŸš€ UI & UX Improvements

  • Responsive Window Sizing: Implemented effective_size() logic. The application now dynamically calculates the optimal window size and position based on your screen resolution (1080p, 1440p, etc.), ensuring UI elements aren't cut off.
  • GitHub Integration: Added a direct link button to the project repository for easy access to source code and updates.
  • Layout Reorganization: Introduced bit_frame and bonus_frame to cleanly organize the growing number of tools, preventing UI clutter.

πŸ”§ Technical Refactoring (Under the Hood)

Core Logic Split (add_special βž” active_add)

  • The Change: The monolithic add_special method was refactored. The execution logic was extracted into a new, standalone active_add method.
  • The Benefit: This decoupling makes the code modular. It allowed for the easy integration of Bitmaps without duplicating code and simplifies future additions (e.g., new shape types).

Robust State Management

  • The Change: Enhanced deactivate() and draw_tool() methods.
  • The Benefit: Switching tools is now safer. The system explicitly unbinds events and resets cursors when moving between complex modes (like Magnet) and standard tools (like Pencil), preventing "stuck" states.

Performance & Stability

  • Thread Safety: The usage timer (stopwatch) now uses after() to update the UI on the main thread, preventing race conditions and crashes.
  • Error Handling: Added robust error catching for image uploads (corrupt files) and PDF saving (missing dependencies).
  • Daemon Threads: Background tasks now close cleanly when the application exits.

πŸ› Bug Fixes

  • Import Handling: Added missing imports (simpledialog, webbrowser) to prevent runtime errors when accessing new features.
  • Mode Safety: Added checks to ensure last_active modes are properly cleared before starting new actions.
  • Input Validation: Fixed potential errors when cancelling text input dialogs.