Repository navigation
v0.1.0
🚀 Release Notes — OSD Clock v0.1.0
A major release featuring full configuration support, performance optimizations, enhanced display options, and extended tray management—all built on top of native Win32/GDI API calls.
🔥 New Features & Enhancements
⚙️ Cascading Configuration System
config.toml Support: Added support for external TOML configuration files, enabling persistent customization of fonts, sizes, colors, coordinates, and time formats.
Cascading Overrides: Config settings now seamlessly follow a three-tier precedence hierarchy: Hardcoded Defaults → config.toml → CLI Flags. Command-line flags always take the highest priority for on-the-fly tweaking.
🕒 Flexible Time Formats
12-Hour & 24-Hour Modes: Added support for both 12-hour (clean 02:30 format without AM/PM clutter) and standard 24-hour (14:30) display modes via the time_format parameter or -format CLI flag.
🎛️ System Tray Window Toggle
Show/Hide Window: Added a checkable "Показать часы" (Show Clock) toggle menu item in the system tray context menu, allowing users to instantly hide or reveal the OSD clock overlay without closing the process.
⚡ Performance & Clean Architecture
Zero-Allocation Rendering Loop: Replaced dynamic string formatting with an in-place TimeBuffer ([6]uint16) writing UTF-16 characters directly to memory, eliminating Garbage Collector overhead during the 1-second render cycle.
Cached GDI Resources: Cached font handles (HFONT) and background brush handles (HBRUSH) upon initialization, preventing GDI handle leaks and CPU spikes during redraws.
Auto Screen Bounds Recalculation: Handled WM_DISPLAYCHANGE events to automatically reposition the clock overlay on resolution or multi-monitor topology changes.
Robust Error Handling: Added explicit checks for Win32 API returns (CreateFontW, CreateWindowEx, SetWindowPos) with detailed diagnostic error logging.