From 02530d3e1b0c964e5251051668922a4e5682418b Mon Sep 17 00:00:00 2001
From: joostverburg
Date: Fri, 27 Jun 2003 20:37:50 +0000
Subject: [PATCH] Options to disable bitmap stretching
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2685 212acab6-be3b-0410-9dea-997c60f758d6
---
Contrib/Modern UI/Changelog.txt | 6 ++++--
Contrib/Modern UI/Readme.html | 17 +++++++++++++++--
Contrib/Modern UI/System.nsh | 14 +++++++++++++-
3 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/Contrib/Modern UI/Changelog.txt b/Contrib/Modern UI/Changelog.txt
index ce2fce8c..edd4d53a 100644
--- a/Contrib/Modern UI/Changelog.txt
+++ b/Contrib/Modern UI/Changelog.txt
@@ -1,15 +1,17 @@
NSIS Modern User Interface - VERSION HISTORY
-1.65 - June 17, 2003
+1.65 - June 16, 2003
* New page configuration system, no different system for installers
with custom pages
* Default windows color for the license text background
* New format for example scripts
* Improved registry storage for Start Menu folder
* ReserveFile macro for StartMenu plug-in
-* Added MUI_LANGDLL_ALWAYSSHOW option
+* Option to always show the language selection dialog
+ (even if a language has been stored in the registry)
* Checkboxes on Finish page can be used to call a function
* Support for a link on the Finish page
+* Options to disable bitmap stretching
1.64 - April 27, 2003
* Support for license page with checkbox or radiobuttons to let the
diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html
index e362285f..a1976535 100644
--- a/Contrib/Modern UI/Readme.html
+++ b/Contrib/Modern UI/Readme.html
@@ -330,6 +330,10 @@ follow these steps:
MUI_HEADERBITMAP_RIGHT
Display the header image on the right side instead of the left side.
+
MUI_HEADERBITMAP_NOSTRETCH
+ Do not stretch the header bitmap to fit the size of the field. Use this option only if you have an
+ image that does not use the whole space. If you have a full size bitmap that fits exactly, you should
+ not use this option because the size of the field will be different if the user has a custom DPI setting.
MUI_SPECIALINI ini_file
InstallOptions INI file for the Welcome and Finish page.
@@ -337,6 +341,13 @@ follow these steps:
MUI_SPECIALBITMAP bmp_file
Bitmap for the Welcome and Finish page (recommended size: 164x314 pixels).
Default: ${NSISDIR}\Contrib\Icons\modern-wizard.bmp
+
+
MUI_SPECIALBITMAP_NOSTRETCH
+ Do not stretch the bitmap for the Welcome and Finish page to fit the size of the field.
+ Use this option only if you have an image that does not use the whole space. If you have a full size
+ bitmap that fits exactly, you should not use this option because the size of the field will be different
+ if the user has a custom DPI setting.
+
MUI_BGCOLOR (color: 0xBBGGRR)
Background color for the header, Welcome page and Finish page.
Default: 0xFFFFFF
MUI_RTL_UI
@@ -651,7 +662,7 @@ MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
-- 1.65 - June 17, 2003
+
- 1.65 - June 26, 2003
- New page configuration system, no different system for installers
with custom pages
@@ -659,9 +670,11 @@ MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
- New format for example scripts
- Improved registry storage for Start Menu folder
- ReserveFile macro for StartMenu plug-in
- - Added MUI_LANGDLL_ALWAYSSHOW option
+ - Option to always show the language selection dialog
+ (even if a language has been stored in the registry)
- Checkboxes on Finish page can be used to call a function
- Support for a link on the Finish page
+ - Options to disable bitmap stretching
diff --git a/Contrib/Modern UI/System.nsh b/Contrib/Modern UI/System.nsh
index 3a9ad33c..35cc666e 100644
--- a/Contrib/Modern UI/System.nsh
+++ b/Contrib/Modern UI/System.nsh
@@ -381,6 +381,11 @@
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Text" "$(MUI_TEXT_WELCOME_INFO_TEXT)"
!endif
+ ;Set stretching option
+ !ifdef MUI_SPECIALBITMAP_NOSTRETCH
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Flags" ""
+ !endif
+
!endif
!macroend
@@ -390,7 +395,11 @@
!ifdef MUI_HEADERBITMAP
InitPluginsDir
File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERBITMAP}"
- SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
+ !ifndef MUI_HEADERBITMAP_NOSTRETCH
+ SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
+ !else
+ SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
+ !endif
!endif
!macroend
@@ -979,6 +988,9 @@
GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1202
SetBkColor ${MUI_TEMP2} "${MUI_BGCOLOR}"
+
+ GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1200
+ SetBkColor ${MUI_TEMP2} "${MUI_BGCOLOR}"
!ifdef MUI_CUSTOMFUNCTION_WELCOME_SHOW
Call "${MUI_CUSTOMFUNCTION_WELCOME_SHOW}"