8000 Dark Mode · gitextensions/gitextensions Wiki · GitHub
[go: up one dir, main page]

Skip to content

Dark Mode

Gerhard Olsson edited this page May 18, 2025 · 1 revision

General

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.

Built-in themes

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.

Console emulation

The console style is set separately in Appearance/Console style.

Known Issues

All screenshots may not be completely matched to the latest version.

Application colors

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.

Other

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 unreadable

Categories in FileLists are unreadable and cannot be customized.

Remote repo

Dashboard

Tracked in https://github.com/dotnet/winforms/issues/11965

Disabled button text

Disabled button text is black on dark gray and hard to read.

disabled button

disabled browse

Related to https://github.com/dotnet/winforms/issues/11950

Light tooltips

tooltip

No style for tooltip https://github.com/dotnet/winforms/pull/12420

Bright disabled textboxes

White background for unreadable textboxes, maybe ok for single line but not for commit textbox.

image

https://github.com/dotnet/winforms/issues/11894

Bright checkboxes

Occurs occasionally.

https://github.com/dotnet/winforms/issues/11956

Also bright toolbar https://github.com/dotnet/winforms/issues/12991

Not to be changed

No theme for popups

popup

This by design, similar to for instance Visual Studio.

https://github.com/dotnet/winforms/issues/11896

Scrollbars in Console Emulator is bright

ConEmu cannot be themed currently.

Workarounds

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.

Dark mode compatibility guidelines

  1. If possible use system colors and icons that can be used in both light and dark mode.
  2. Adapt colors dynamically as described below, both for colors and icons.
  3. Use Application.IsDarkModeEnabled to set dark mode specific handling for colors. There are currently no dark mode icons.
  4. Add new theme AppColors to customize behavior in themes.

Adapting bitmaps

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.

Adapting individual colors

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.

Implementation details

GitExtensions 3.x

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.

Clone this wiki locally
0