diff --git a/Contrib/Modern UI 2/Interface.nsh b/Contrib/Modern UI 2/Interface.nsh
index 4333e783..74e1a382 100644
--- a/Contrib/Modern UI 2/Interface.nsh
+++ b/Contrib/Modern UI 2/Interface.nsh
@@ -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
diff --git a/Contrib/Modern UI 2/Pages/Directory.nsh b/Contrib/Modern UI 2/Pages/Directory.nsh
index 1d5ebf7d..62093571 100644
--- a/Contrib/Modern UI 2/Pages/Directory.nsh
+++ b/Contrib/Modern UI 2/Pages/Directory.nsh
@@ -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
diff --git a/Contrib/Modern UI 2/Pages/Finish.nsh b/Contrib/Modern UI 2/Pages/Finish.nsh
index 74431c4e..be986a48 100644
--- a/Contrib/Modern UI 2/Pages/Finish.nsh
+++ b/Contrib/Modern UI 2/Pages/Finish.nsh
@@ -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
diff --git a/Contrib/Modern UI 2/Pages/License.nsh b/Contrib/Modern UI 2/Pages/License.nsh
index 05a3fe64..a74214a0 100644
--- a/Contrib/Modern UI 2/Pages/License.nsh
+++ b/Contrib/Modern UI 2/Pages/License.nsh
@@ -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
diff --git a/Contrib/Modern UI 2/Pages/StartMenu.nsh b/Contrib/Modern UI 2/Pages/StartMenu.nsh
index 831d5911..71c41bb6 100644
--- a/Contrib/Modern UI 2/Pages/StartMenu.nsh
+++ b/Contrib/Modern UI 2/Pages/StartMenu.nsh
@@ -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
diff --git a/Contrib/Modern UI 2/Pages/Welcome.nsh b/Contrib/Modern UI 2/Pages/Welcome.nsh
index f4720446..9d0c43f3 100644
--- a/Contrib/Modern UI 2/Pages/Welcome.nsh
+++ b/Contrib/Modern UI 2/Pages/Welcome.nsh
@@ -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
diff --git a/Contrib/Modern UI 2/Readme.html b/Contrib/Modern UI 2/Readme.html
index 66203bef..5de03f4a 100644
--- a/Contrib/Modern UI 2/Readme.html
+++ b/Contrib/Modern UI 2/Readme.html
@@ -339,6 +339,10 @@
MUI_HEADER_TRANSPARENT_TEXT
Set a transparent background for the header's label controls. Useful for custom
user interfaces that set a bigger header image.
+ MUI_TEXTCOLOR (color: RRGGBBR hexadecimal)
+ Text color for the header, the Welcome page and the Finish page.
+ Default: 000000
+ MUI_TEXTCOLOR (color: RRGGBBR hexadecimal)
+ Text color for the header, the Welcome page and the Finish page.
+ Default: 000000