How to change NSIS installer background color based on system color

两盒软妹~` 提交于 2020-06-01 07:32:28

问题


It seems that NSIS has hardcoded the background color to be white.

Whenever high contrast is turned on, the background remains white while the text is reverted to white (to comply with high contrast).

Is there a way to determine the current system colors and change the background accordingly?


回答1:


If you are not using a wizard/header image that depends on the background being white you can simply do

!define MUI_BGCOLOR "SYSCLR:Window"
!include MUI2.nsh
...

in recent versions of NSIS v3.

If you want to force black on white then you must manually change the Modern UI .nsh files. Look for lines that look like SetCtlColors $SomeNameHere "" "${MUI_BGCOLOR}" and change them to SetCtlColors $SomeNameHere "000000" "FFFFFF".



来源:https://stackoverflow.com/questions/52211779/how-to-change-nsis-installer-background-color-based-on-system-color

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!