ImageGlass icon indicating copy to clipboard operation
ImageGlass copied to clipboard

Sync dark/light theme with Windows 10

Open d2phap opened this issue 7 years ago • 2 comments

Chris:

The latest version of windows has a dark theme, which changes elements such as context menus to be dark, so if I schedule windows to change to the dark theme automatically at night, it wouldn't affect ImageGlass, because all elements are skinned.​

d2phap avatar Oct 09 '18 12:10 d2phap

Need to research the message code for WndProc function https://github.com/d2phap/ImageGlass/blob/master/Source/ImageGlass/frmMain.cs#L2065

d2phap avatar Nov 08 '18 07:11 d2phap

The configuration can be queried in the registry's following location:

  • Key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize
  • Value: AppsUseLightTheme

When the value equals 0 (DWORD), it means it is in dark mode. Altering the value triggers immediately Windows Explorer to go/exit dark mode.

Some resources:

  • https://stackoverflow.com/questions/53501268/win10-dark-theme-how-to-use-in-winapi
  • https://github.com/ysc3839/win32-darkmode
  • https://github.com/microsoft/terminal/issues/277#issuecomment-428831635

d2phap avatar Apr 21 '20 12:04 d2phap

Implemented in v9.0 beta 4. In igconfig.json file, you can specify the theme for dark and light mode:

{
  "DarkTheme": "Kobe",
  "LightTheme": "Kobe - Light",
}

d2phap avatar Apr 14 '23 16:04 d2phap