Chasing the dark mode dragon

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7276 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2021-07-08 18:23:28 +00:00
parent 7547e7dc33
commit 9aecfe373d

View file

@ -77,8 +77,11 @@ ReadRegDWORD $UseLightTheme HKCU "Software\Microsoft\Windows\CurrentVersion\Them
StrCmp $UseLightTheme "" 0 +2
StrCpy $UseLightTheme 1 ; Default
StrCmp $UseLightTheme "0" 0 +2
System::Call 'USER32::SetProp(p$hWndParent,t"UseImmersiveDarkModeColors",i1)'
StrCmp $UseLightTheme "0" 0 +5
System::Call 'DWMAPI::DwmSetWindowAttribute(p$hWndParent,i20,*i1,i4)i.r0' ; 20H1
IntCmp $0 0 +3 +3
System::Call 'DWMAPI::DwmSetWindowAttribute(p$hWndParent,i19,*i1,i4)i.r0' ; ; 19H1
System::Call 'USER32::SetProp(p$hWndParent,t"UseImmersiveDarkModeColors",i1)' ; 1809
FunctionEnd
!define SetCtlColors "!insertmacro SetCtlColors "