-
Notifications
You must be signed in to change notification settings - Fork 0
Add Windows dark-mode theming to downloader UI #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds Windows high-version dark mode support to the WPF downloader application. When Windows is in dark mode, the application now detects this via registry settings and applies dark theme colors (black background, white text, and dark progress bar).
- Implements registry-based Windows dark mode detection
- Applies dark theme styling to window and progress bar controls
- Adds comprehensive exception handling for registry access failures
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| private const int DarkModeRegistryValue = 0; // 0 means AppsUseLightTheme is false (dark mode enabled) | ||
| private static readonly Brush DarkBackgroundBrush = Brushes.Black; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The static brush fields defined here are never used in the code. The ApplySystemTheme method directly uses Brushes.Black and Brushes.White instead of these DarkBackgroundBrush and DarkForegroundBrush fields. Either use these fields in ApplySystemTheme or remove them to avoid unnecessary code.
| { | ||
| return; | ||
| } | ||
|
|
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting only the Background property of the ProgressBar to black will not provide proper dark mode styling. In dark mode, the ProgressBar's foreground (the filled portion) should remain visible against the black background. Consider setting the Foreground property of DownloadProgressBar to a light color or adjusting other styling properties to ensure the progress indicator remains visible in dark mode.
| return; | ||
| } | ||
|
|
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting only the window's Background and Foreground properties won't automatically apply dark mode styling to all child controls. The Hyperlink, TextBlocks, and RadioButtons will retain their default styling and may not be readable in dark mode. Consider applying dark theme colors to these controls as well, or use a comprehensive WPF theming solution.
Co-authored-by: mrbbbaixue <17956756+mrbbbaixue@users.noreply.github.com>
High Windows versions should render the downloader in dark mode (black background/white text, matching progress bar) when the OS is in dark theme.
Dark-mode detection
AppsUseLightThemefromHKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize; treat value0as dark mode.Theming application
Example:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.