CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Dark Mode
GitExtensions master development (planned to be released as 5.3 or 6.0) uses experimental dark mode theming in .NET9 WinForms. The theming is not generic, just light/dark mode variants. The system colors are set by .NET but the application colors can to some extent be adjusted too.
This Wiki page lists the current status (and possibly what can be done to address them). It is not intended as a place for questions and answers (PRs and issues for that). Please edit this page to match the status in the latest development branch related to this. If there are obvious shortcomings when the feature is released, this should be documented in the official documentation.
Git Extensions includes the following themes by default:
- default: Windows light mode
- light+: default light theme with slightly darker panel background (the default is white backgrounds)
- dark: Windows dark mode
- dark+: Windows dark mode with darker panel backgrounds (the Windows default is lighter gray)
Application colors and styles can only be properly adjusted once at startup. Color settings page notifies the user about it when color scheme changes.
The console style is set separately in Appearance/Console style.
All screenshots may not be completely matched to the latest version.
Icons and colors set in the app may require further tweaking. Some are set in the theme, other are adjusted (by code) from the default colors/icons.
Most issues are described in https://github.com/gitextensions/gitextensions/pull/12111
Dark mode is experimental in WinForms for .NET9, Microsoft will likely improve the implementation in .NET10. Relevant issues are listed at the descriptions. Microsoft winforms lists identified issues and PRs for .NET10.
Categories in FileLists are unreadable and cannot be customized.
Tracked in https://github.com/dotnet/winforms/issues/11965
Disabled button text is black on dark gray and hard to read.
Related to https://github.com/dotnet/winforms/issues/11950
No style for tooltip https://github.com/dotnet/winforms/pull/12420
White background for unreadable textboxes, maybe ok for single line but not for commit textbox.
https://github.com/dotnet/winforms/issues/11894
Occurs occasionally.
https://github.com/dotnet/winforms/issues/11956
Also bright toolbar https://github.com/dotnet/winforms/issues/12991
This by design, similar to for instance Visual Studio.
https://github.com/dotnet/winforms/issues/11896
ConEmu cannot be themed currently.
Where possible Git Extensions have applied workarounds for known limitations in .NET9 https://github.com/gitextensions/gitextensions/blob/master/src/app/GitExtUtils/GitUI/Theming/ThemeFix.cs These workarounds may not be required in .NET10.
- Buttons rendered as Flat instead of standard. https://github.com/dotnet/winforms/issues/11949
- Link colors adjusted
- Tab page headers updated
- Column headers in GridView forced updated
- Some borders of textboxes fixed
- ToolStrip are explicitly set to use
ToolStripRenderMode.Professional
(Related to https://github.com/dotnet/winforms/issues/12909?)
- If possible use system colors and icons that can be used in both light and dark mode.
- Adapt colors dynamically as described below, both for colors and icons.
- Use Application.IsDarkModeEnabled to set dark mode specific handling for colors. There are currently no dark mode icons.
- Add new theme AppColors to customize behavior in themes.
Application icons should be viewable in both light and dark mode. Bitmaps with significant gray scale share may need to be adjusted for dark mode, use AdaptLightness() helper method.
Note that adaptation is required in every use, so the icon lists for scripts will use the default rendering.
Whenever new code uses .NET classes SystemColors
, SystemBrushes
or SystemPens
, it is dark-mode-compatible. Other colors can be dynamically adjusted to dark mode by using AdaptTextColor(), AdaptBackColor(), SetForeColorForBackColor() helper methods.
In some situations, the colors need to be tuned for dark mode explicitly. These colors cannot be static.
Git Extensions 3.x used .NET 4 framework that could use low level hooks to override theme colors that is no longer possible with .NET5 and later. For details about the previous implementation, see older versions of the wiki.