Added MUI_TEXTCOLOR setting. Check/Radio control themes are disabled when high contrast mode is on as a band-aid for SetCtlColors issues.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7013 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2018-09-13 13:35:25 +00:00
parent 67b443ec18
commit a852d07897
14 changed files with 132 additions and 50 deletions

View file

@ -49,6 +49,7 @@ Var mui.Button.Back
!insertmacro MUI_DEFAULT MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!insertmacro MUI_DEFAULT MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!insertmacro MUI_DEFAULT MUI_BGCOLOR "FFFFFF"
!insertmacro MUI_DEFAULT MUI_TEXTCOLOR "000000"
;Map *_NOSTRETCH legacy define to the correct *_STRETCH value
!verbose push 2
@ -241,11 +242,11 @@ Var mui.Button.Back
GetDlgItem $mui.Header.SubText $HWNDPARENT 1038
!ifndef MUI_HEADER_TRANSPARENT_TEXT
SetCtlColors $mui.Header.Text "" "${MUI_BGCOLOR}"
SetCtlColors $mui.Header.SubText "" "${MUI_BGCOLOR}"
SetCtlColors $mui.Header.Text "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
SetCtlColors $mui.Header.SubText "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!else
SetCtlColors $mui.Header.Text "" "transparent"
SetCtlColors $mui.Header.SubText "" "transparent"
SetCtlColors $mui.Header.Text "${MUI_TEXTCOLOR}" "transparent"
SetCtlColors $mui.Header.SubText "${MUI_TEXTCOLOR}" "transparent"
!endif
;Header image

View file

@ -112,7 +112,8 @@ Directory page
GetDlgItem $mui.DirectoryPage.SpaceAvailable $mui.DirectoryPage 1024
!ifdef MUI_DIRECTORYPAGE_BGCOLOR
SetCtlColors $mui.DirectoryPage.Directory "" "${MUI_DIRECTORYPAGE_BGCOLOR}"
!insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXTCOLOR ""
SetCtlColors $mui.DirectoryPage.Directory "${MUI_DIRECTORYPAGE_TEXTCOLOR}" "${MUI_DIRECTORYPAGE_BGCOLOR}"
!endif
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW

View file

@ -327,22 +327,22 @@ Finish page (implemented using nsDialogs)
;Title text
${NSD_CreateLabel} 120u 10u 195u ${MUI_FINISHPAGE_TITLE_HEIGHT}u "${MUI_FINISHPAGE_TITLE}"
Pop $mui.FinishPage.Title
SetCtlColors $mui.FinishPage.Title "" "${MUI_BGCOLOR}"
SetCtlColors $mui.FinishPage.Title "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
CreateFont $mui.FinishPage.Title.Font "$(^Font)" "12" "700"
SendMessage $mui.FinishPage.Title ${WM_SETFONT} $mui.FinishPage.Title.Font 0
;Finish text
${NSD_CreateLabel} 120u ${MUI_FINISHPAGE_TEXT_TOP}u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS}u "${MUI_FINISHPAGE_TEXT_REBOOT}"
Pop $mui.FinishPage.Text
SetCtlColors $mui.FinishPage.Text "" "${MUI_BGCOLOR}"
SetCtlColors $mui.FinishPage.Text "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
;Radio buttons for reboot page
${NSD_CreateRadioButton} 120u ${MUI_FINISHPAGE_REBOOTNOW_TOP}u 195u 10u "${MUI_FINISHPAGE_TEXT_REBOOTNOW}"
Pop $mui.FinishPage.RebootNow
SetCtlColors $mui.FinishPage.RebootNow "" "${MUI_BGCOLOR}"
SetCtlColors $mui.FinishPage.RebootNow "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
${NSD_CreateRadioButton} 120u ${MUI_FINISHPAGE_REBOOTLATER_TOP}u 195u 10u "${MUI_FINISHPAGE_TEXT_REBOOTLATER}"
Pop $mui.FinishPage.RebootLater
SetCtlColors $mui.FinishPage.RebootLater "" "${MUI_BGCOLOR}"
SetCtlColors $mui.FinishPage.RebootLater "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!ifndef MUI_FINISHPAGE_REBOOTLATER_DEFAULT
SendMessage $mui.FinishPage.RebootNow ${BM_SETCHECK} ${BST_CHECKED} 0
!else
@ -357,7 +357,7 @@ Finish page (implemented using nsDialogs)
;Title text
${NSD_CreateLabel} 120u 10u 195u ${MUI_FINISHPAGE_TITLE_HEIGHT}u "${MUI_FINISHPAGE_TITLE}"
Pop $mui.FinishPage.Title
SetCtlColors $mui.FinishPage.Title "" "${MUI_BGCOLOR}"
SetCtlColors $mui.FinishPage.Title "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
CreateFont $mui.FinishPage.Title.Font "$(^Font)" "12" "700"
SendMessage $mui.FinishPage.Title ${WM_SETFONT} $mui.FinishPage.Title.Font 0
@ -368,13 +368,13 @@ Finish page (implemented using nsDialogs)
${NSD_CreateLabel} 120u ${MUI_FINISHPAGE_TEXT_TOP}u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS}u "${MUI_FINISHPAGE_TEXT}"
!endif
Pop $mui.FinishPage.Text
SetCtlColors $mui.FinishPage.Text "" "${MUI_BGCOLOR}"
SetCtlColors $mui.FinishPage.Text "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
;Checkboxes
!ifdef MUI_FINISHPAGE_RUN
${NSD_CreateCheckbox} 120u ${MUI_FINISHPAGE_RUN_TOP}u 195u 10u "${MUI_FINISHPAGE_RUN_TEXT}"
Pop $mui.FinishPage.Run
SetCtlColors $mui.FinishPage.Run "" "${MUI_BGCOLOR}"
SetCtlColors $mui.FinishPage.Run "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!ifndef MUI_FINISHPAGE_RUN_NOTCHECKED
SendMessage $mui.FinishPage.Run ${BM_SETCHECK} ${BST_CHECKED} 0
!endif
@ -383,7 +383,7 @@ Finish page (implemented using nsDialogs)
!ifdef MUI_FINISHPAGE_SHOWREADME
${NSD_CreateCheckbox} 120u ${MUI_FINISHPAGE_SHOWREADME_TOP}u 195u 10u "${MUI_FINISHPAGE_SHOWREADME_TEXT}"
Pop $mui.FinishPage.ShowReadme
SetCtlColors $mui.FinishPage.ShowReadme "" "${MUI_BGCOLOR}"
SetCtlColors $mui.FinishPage.ShowReadme "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!ifndef MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
SendMessage $mui.FinishPage.ShowReadme ${BM_SETCHECK} ${BST_CHECKED} 0
!endif
@ -408,6 +408,24 @@ Finish page (implemented using nsDialogs)
StrCpy $mui.FinishPage.DisableAbortWarning "1"
!endif
!ifndef MUI_FORCECLASSICCONTROLS
${If} ${IsHighContrastModeActive}
!endif
; SetCtlColors does not change the check/radio text color (bug #443)
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
System::Call 'UXTHEME::SetWindowTheme(p$mui.FinishPage.RebootNow,w" ",w" ")'
System::Call 'UXTHEME::SetWindowTheme(p$mui.FinishPage.RebootLater,w" ",w" ")'
!endif
!ifdef MUI_FINISHPAGE_RUN
System::Call 'UXTHEME::SetWindowTheme(p$mui.FinishPage.Run,w" ",w" ")'
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
System::Call 'UXTHEME::SetWindowTheme(p$mui.FinishPage.ShowReadme,w" ",w" ")'
!endif
!ifndef MUI_FORCECLASSICCONTROLS
${EndIf}
!endif
;Show page
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW

View file

@ -121,7 +121,7 @@ License page
Function "${SHOW}"
;Get conrol handles
;Get control handles
FindWindow $mui.LicensePage "#32770" "" $HWNDPARENT
GetDlgItem $mui.LicensePage.TopText $mui.LicensePage 1040
GetDlgItem $mui.LicensePage.Text $mui.LicensePage 1006

View file

@ -136,8 +136,9 @@ Start Menu folder page
GetDlgItem $mui.StartMenuPage.FolderList $mui.StartMenuPage 1004
!ifdef MUI_STARTMENUPAGE_BGCOLOR
SetCtlColors $mui.StartMenuPage.Location "" "${MUI_STARTMENUPAGE_BGCOLOR}"
SetCtlColors $mui.StartMenuMenu.FolderList "" "${MUI_STARTMENUPAGE_BGCOLOR}"
!insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXTCOLOR ""
SetCtlColors $mui.StartMenuPage.Location "${MUI_STARTMENUPAGE_TEXTCOLOR}" "${MUI_STARTMENUPAGE_BGCOLOR}"
SetCtlColors $mui.StartMenuMenu.FolderList "${MUI_STARTMENUPAGE_TEXTCOLOR}" "${MUI_STARTMENUPAGE_BGCOLOR}"
!endif
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW

View file

@ -147,14 +147,14 @@ Welcome page (implemented using nsDialogs)
;Title
${NSD_CreateLabel} 120u 10u 195u ${MUI_WELCOMEPAGE_TITLE_HEIGHT}u "${MUI_WELCOMEPAGE_TITLE}"
Pop $mui.WelcomePage.Title
SetCtlColors $mui.WelcomePage.Title "" "${MUI_BGCOLOR}"
SetCtlColors $mui.WelcomePage.Title "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
CreateFont $mui.WelcomePage.Title.Font "$(^Font)" "12" "700"
SendMessage $mui.WelcomePage.Title ${WM_SETFONT} $mui.WelcomePage.Title.Font 0
;Welcome text
${NSD_CreateLabel} 120u ${MUI_WELCOMEPAGE_TEXT_TOP}u 195u 130u "${MUI_WELCOMEPAGE_TEXT}"
Pop $mui.WelcomePage.Text
SetCtlColors $mui.WelcomePage.Text "" "${MUI_BGCOLOR}"
SetCtlColors $mui.WelcomePage.Text "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
;Show page
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow

View file

@ -339,6 +339,10 @@
<strong>MUI_HEADER_TRANSPARENT_TEXT</strong><br />
Set a transparent background for the header's label controls. Useful for custom
user interfaces that set a bigger header image.</p>
<p>
<strong>MUI_TEXTCOLOR</strong> <span class="parameter">(color: RRGGBBR hexadecimal)</span><br />
Text color for the header, the Welcome page and the Finish page.<br />
<em>Default: 000000</em></p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_inres" src="images/open.gif"

View file

@ -1,6 +1,11 @@
NSIS Modern User Interface
Version History
1.81
* Added MUI_TEXTCOLOR (2018-09-09)
* Added MUI_PAGE_CUSTOMFUNCTION_DESTROYED (2017-04-03)
* Added support for MUI_UNCONFIRMPAGE_VARIABLE (RFE #511) (2016-12-30)
1.8 - August 9, 2007
* Uses the new language files
* Updated documentation

View file

@ -311,6 +311,10 @@
<strong>MUI_HEADER_TRANSPARENT_TEXT</strong><br />
Set a transparent background for the header's label controls. Useful for custom
user interfaces that set a bigger header image.</p>
<p>
<strong>MUI_TEXTCOLOR</strong> <span class="parameter">(color: RRGGBBR hexadecimal)</span><br />
Text color for the header, the Welcome page and the Finish page.<br />
<em>Default: 000000</em></p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_inres" src="images/open.gif"

View file

@ -1,22 +1,22 @@
/*
NSIS Modern User Interface - Version 1.8
NSIS Modern User Interface - Version 1.81
Copyright 2002-2018 Joost Verburg
*/
!ifndef MUI_INCLUDED
!echo "NSIS Modern User Interface version 1.8 - Copyright 2002-2018 Joost Verburg"
!verbose push 3
!define MUI_INCLUDED
!define MUI_SYSVERSION "1.81"
!verbose pop
!echo "NSIS Modern User Interface version ${MUI_SYSVERSION} - Copyright 2002-2018 Joost Verburg"
;--------------------------------
!verbose push 3
!define /IfNDef MUI_VERBOSE 3
!verbose ${MUI_VERBOSE}
!define MUI_INCLUDED
!define MUI_SYSVERSION "1.8"
;--------------------------------
;HEADER FILES, DECLARATIONS
@ -124,6 +124,7 @@ Var MUI_TEMP2
!insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_COLORS "/windows"
!insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_PROGRESSBAR "smooth"
!insertmacro MUI_DEFAULT MUI_BGCOLOR "FFFFFF"
!insertmacro MUI_DEFAULT MUI_TEXTCOLOR "000000"
!insertmacro MUI_DEFAULT MUI_WELCOMEFINISHPAGE_INI "${NSISDIR}\Contrib\Modern UI\ioSpecial.ini"
!insertmacro MUI_DEFAULT MUI_UNWELCOMEFINISHPAGE_INI "${NSISDIR}\Contrib\Modern UI\ioSpecial.ini"
!insertmacro MUI_DEFAULT MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp"
@ -417,24 +418,24 @@ Var MUI_TEMP2
!ifndef MUI_HEADER_TRANSPARENT_TEXT
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!else
SetCtlColors $MUI_TEMP1 "" "transparent"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "transparent"
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
SetCtlColors $MUI_TEMP1 "" "transparent"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "transparent"
!endif
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1034
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1034 ; Header background
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039 ; Header image
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
@ -1284,16 +1285,16 @@ Var MUI_TEMP2
!insertmacro INSTALLOPTIONS_INITDIALOG "ioSpecial.ini"
Pop $MUI_HWND
SetCtlColors $MUI_HWND "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_HWND "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
GetDlgItem $MUI_TEMP1 $MUI_HWND 1201
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
CreateFont $MUI_TEMP2 "$(^Font)" "12" "700"
SendMessage $MUI_TEMP1 ${WM_SETFONT} $MUI_TEMP2 0
GetDlgItem $MUI_TEMP1 $MUI_HWND 1202
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
@ -1394,9 +1395,10 @@ Var MUI_TEMP2
Function "${SHOW}"
!ifdef MUI_DIRECTORYPAGE_BGCOLOR
!insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXTCOLOR ""
FindWindow $MUI_TEMP1 "#32770" "" $HWNDPARENT
GetDlgItem $MUI_TEMP1 $MUI_TEMP1 1019
SetCtlColors $MUI_TEMP1 "" "${MUI_DIRECTORYPAGE_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_DIRECTORYPAGE_TEXTCOLOR}" "${MUI_DIRECTORYPAGE_BGCOLOR}"
!endif
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
@ -1444,10 +1446,11 @@ Var MUI_TEMP2
Pop $MUI_HWND
!ifdef MUI_STARTMENUPAGE_BGCOLOR
!insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXTCOLOR ""
GetDlgItem $MUI_TEMP1 $MUI_HWND 1002
SetCtlColors $MUI_TEMP1 "" "${MUI_STARTMENUPAGE_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_STARTMENUPAGE_TEXTCOLOR}" "${MUI_STARTMENUPAGE_BGCOLOR}"
GetDlgItem $MUI_TEMP1 $MUI_HWND 1004
SetCtlColors $MUI_TEMP1 "" "${MUI_STARTMENUPAGE_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_STARTMENUPAGE_TEXTCOLOR}" "${MUI_STARTMENUPAGE_BGCOLOR}"
!endif
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
@ -1593,11 +1596,11 @@ Var MUI_TEMP2
!insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Bottom" "120"
!endif
!ifdef MUI_FINISHPAGE_REBOOTLATER_DEFAULT
!insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "0"
!insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "0"
!insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "State" "1"
!else
!insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "1"
!insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "State" "0"
!insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "State" "0"
!endif
Goto mui.finish_load
@ -1762,26 +1765,26 @@ Var MUI_TEMP2
!insertmacro INSTALLOPTIONS_INITDIALOG "ioSpecial.ini"
Pop $MUI_HWND
SetCtlColors $MUI_HWND "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_HWND "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
GetDlgItem $MUI_TEMP1 $MUI_HWND 1201
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
CreateFont $MUI_TEMP2 "$(^Font)" "12" "700"
SendMessage $MUI_TEMP1 ${WM_SETFONT} $MUI_TEMP2 0
GetDlgItem $MUI_TEMP1 $MUI_HWND 1202
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
IfRebootFlag 0 mui.finish_noreboot_show
GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
GetDlgItem $MUI_TEMP1 $MUI_HWND 1204
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
Goto mui.finish_show
@ -1791,7 +1794,7 @@ Var MUI_TEMP2
!ifdef MUI_FINISHPAGE_RUN
GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
@ -1800,7 +1803,7 @@ Var MUI_TEMP2
!else
GetDlgItem $MUI_TEMP1 $MUI_HWND 1204
!endif
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
SetCtlColors $MUI_TEMP1 "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!endif
!ifdef MUI_FINISHPAGE_LINK
@ -1818,6 +1821,27 @@ Var MUI_TEMP2
mui.finish_show:
!endif
!ifndef MUI_FORCECLASSICCONTROLS
${If} ${IsHighContrastModeActive}
!endif
; SetCtlColors does not change the check/radio text color (bug #443)
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
System::Call 'UXTHEME::SetWindowTheme(p$MUI_TEMP1,w" ",w" ")'
GetDlgItem $MUI_TEMP1 $MUI_HWND 1204
System::Call 'UXTHEME::SetWindowTheme(p$MUI_TEMP1,w" ",w" ")'
!else ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME
GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
System::Call 'UXTHEME::SetWindowTheme(p$MUI_TEMP1,w" ",w" ")'
!ifdef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
GetDlgItem $MUI_TEMP1 $MUI_HWND 1204
System::Call 'UXTHEME::SetWindowTheme(p$MUI_TEMP1,w" ",w" ")'
!endif
!endif
!ifndef MUI_FORCECLASSICCONTROLS
${EndIf}
!endif
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
!ifdef MUI_FINISHPAGE_CANCEL_ENABLED

View file

@ -109,9 +109,9 @@ Function nsDialogsWelcome
nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 32u -130u -32u "nsDialogs is the next generation of user interfaces in NSIS. It gives the developer full control over custom pages. Some of the features include control text containing variables, callbacks directly into script functions and creation of any type of control. Create boring old edit boxes or load some external library and create custom controls with no need of creating your own plug-in.$\r$\n$\r$\nUnlike InstallOptions, nsDialogs doesn't use INI files to communicate with the script. By interacting directly with the script, nsDialogs can perform much faster without the need of costly, old and inefficient INI operations. Direct interaction also allows direct calls to functions defined in the script and removes the need of conversion functions like Io2Nsis.$\r$\n$\r$\nHit the Next button to see how it all fits into a mock directory page."
Pop $TEXT
SetCtlColors $DIALOG "" 0xffffff
SetCtlColors $HEADLINE "" 0xffffff
SetCtlColors $TEXT "" 0xffffff
SetCtlColors $DIALOG 0 0xffffff
SetCtlColors $HEADLINE 0 0xffffff
SetCtlColors $TEXT 0 0xffffff
Call HideControls

View file

@ -6,10 +6,14 @@ Released on ??? ??th, 20??
\S1{v3.04-cl} Changelog
\S2{} Minor Changes
\S2{} Major Changes
\b Added IsNativeProcessorArchitecture helper macros to x64.nsh
\S2{} Minor Changes
\b Added MUI_TEXTCOLOR setting
\b Added NTMARTA to preload list to fix rare Windows 7 security issue (\W{http://sf.net/p/nsis/bugs/1204}{bug #1204})
\b MakeNSIS prints -CMDHELP to stdout (\W{http://sf.net/p/nsis/bugs/1203}{bug #1203})

View file

@ -134,7 +134,7 @@ Sets the text and background color of a static control, edit control, button or
\c FunctionEnd
\NsisWarnBlockContainerBegin
\\<b\\>Warning:\\</b\\> Setting the background color of check boxes to \c{transparent} may not function properly when using \c{\R{axpstyle}{XPStyle} on}. The background may be completely black instead of transparent when using certain Windows themes.
\\<b\\>Warning:\\</b\\> Setting the background color of check boxes to \c{transparent} may not function properly when using \c{\R{axpstyle}{XPStyle} on}. The background may be completely black instead of transparent when using certain Windows themes. The text color might also be ignored when Visual Styles are enabled.
\NsisWarnBlockContainerEnd
\S2{setsilent} SetSilent

View file

@ -160,5 +160,25 @@ Pop ${_outvar}
!macroend
!define /IfNDef SPI_GETHIGHCONTRAST 0x42
!define /IfNDef HCF_HIGHCONTRASTON 0x01
!define /IfNDef /math SYSSIZEOF_HIGHCONTRAST 8 + ${NSIS_PTR_SIZE}
!define IsHighContrastModeActive '"" IsHighContrastModeActive ""'
!macro _IsHighContrastModeActive _lhs _rhs _t _f
!ifmacrondef _LOGICLIB_TEMP
!include LogicLib.nsh
!endif
!insertmacro _LOGICLIB_TEMP
Push $1
System::Call '*(i${SYSSIZEOF_HIGHCONTRAST},i0,p)p.r1'
System::Call 'USER32::SystemParametersInfo(i${SPI_GETHIGHCONTRAST},i${SYSSIZEOF_HIGHCONTRAST},pr1,i0)'
System::Call '*$1(i,i.s)'
Pop $_LOGICLIB_TEMP
System::Free $1
Pop $1
!insertmacro _& $_LOGICLIB_TEMP ${HCF_HIGHCONTRASTON} `${_t}` `${_f}`
!macroend
!endif # !___UTIL__NSH___
!verbose pop