feat(windows): Windows C++ native platform implementation - #358
Open
khaphanspace wants to merge 17 commits into
Open
feat(windows): Windows C++ native platform implementation#358khaphanspace wants to merge 17 commits into
khaphanspace wants to merge 17 commits into
Conversation
Full Windows platform using C++17/Win32 native UI with Rust core FFI: - CMake + Corrosion build system (x64/ARM64) - Global keyboard hook via SetWindowsHookEx - System tray with context menu - Modern settings window (DPI-aware, light/dark theme) - Per-app IME state persistence via Registry - Shortcuts dialog with import/export - Auto-update checker via GitHub releases API - PowerShell build script for local development
5 tasks
- Add build-windows target using PowerShell build script - Add windows build dir to clean target - Update help text
- Fix font handle leaks in AboutDialog (store as members, delete in dtor) - Fix detached thread UaF in UpdateChecker (joinable thread, join in dtor) - Fix static bgBrush leak in settings_window (recreate on theme change) - Fix thread safety in PerAppMode (lock GetAppState/SetAppState) - Fix deprecated codecvt in shortcuts import/export (use Win32 API) - Fix license mismatch: MIT → GPL-3.0 in resources.rc and about dialog - Fix wrong GitHub URLs in DEBUGGING.md and README.md - Remove dead DialogProc and unnecessary const_cast in settings_window - Deduplicate CMake source list into GONHANH_SOURCES variable - Reduce 16KB stack buffer to 256 chars in per_app registry enum - Restore *.profraw/*.profdata in .gitignore for Rust coverage
- 150ms ease-out cubic slide animation for knob position - Track color blends smoothly between off/on states - Pressed state: knob shrinks 15% on mouse down (Windows 11 squish) - SetToggleState snaps instantly (no animation on settings load) - ~60fps via WM_TIMER, auto-kills when animation completes - Double-buffered rendering prevents flicker during animation
- Toggle rows: 36dp (from 40dp) — tighter for single-line items - Subtitle rows (shortcuts section): 44dp — proper space for title+subtitle - Section gap: 14dp (from 6dp) — clear visual separation between groups
- Remove sectionGap padding — rows now flow with uniform rowHeight - Add thin divider lines at section boundaries (section 1→2, 3→4) - Store dividerY positions, update on scroll - Consistent vertical rhythm: no more uneven gaps between sections
- Store tab hit rects (tabSettingsRect_, tabAboutRect_) - Handle clicks: Settings tab stays on settings, About tab opens AboutDialog - Hand cursor on hover for sidebar tabs
- SwitchTab() hides/shows settings controls per active tab - PaintAbout() renders logo, version, description, license in content area - No more popup dialog — About content displayed inline - Shortcuts click guarded to settings tab only
- Centered layout: logo → name → tagline → version → buttons → footer - 3 clickable link cards: Ủng hộ, Báo lỗi, GitHub (opens in browser) - Footer: author credit and GPL-3.0 license - Hand cursor on about button hover - Content matches macOS AboutPageView
- DrawHeartIcon: filled heart shape (pink, for Sponsor) - DrawBugIcon: bug with legs (for Report bug) - DrawCodeIcon: </> brackets (for GitHub) - Icons drawn centered above label text in each button card
Replace custom GDI+ icon drawing with native Windows icon font. Uses Segoe Fluent Icons (Win11) with Segoe MDL2 Assets fallback (Win10). Icons: HeartFill (E0xEB51), Bug (0xEBE8), DeveloperTools (0xEC7A).
…ooter - "Kha Phan" → blue underline, opens LinkedIn - "Cộng đồng" → blue underline, opens CONTRIBUTORS.md - Hand cursor on hover for both links - Text segments measured and centered as a single line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Files
platforms/windows/src/— 28 C++ source files (14 .cpp + 14 .h)platforms/windows/CMakeLists.txt— build configscripts/build-windows.ps1— PowerShell build scriptdocs/install-windows.md— user install guide.gitignore— addplatforms/windows/build/Test plan
Replaces #357 (cleaned up merge history)