[Python-checkins] cpython (merge 3.5 -> default): Issue #24293: Fixes installer colors to use system settings throughout.

steve.dower python-checkins at python.org
Wed May 27 05:46:43 CEST 2015


https://hg.python.org/cpython/rev/37ed61b1234a
changeset:   96307:37ed61b1234a
parent:      96305:c8d66b13c2e7
parent:      96306:a77214dbf1f3
user:        Steve Dower <steve.dower at microsoft.com>
date:        Tue May 26 20:46:29 2015 -0700
summary:
  Issue #24293: Fixes installer colors to use system settings throughout.

files:
  Tools/msi/bundle/Default.thm                                 |  16 +++++-----
  Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp |   4 +-
  2 files changed, 10 insertions(+), 10 deletions(-)


diff --git a/Tools/msi/bundle/Default.thm b/Tools/msi/bundle/Default.thm
--- a/Tools/msi/bundle/Default.thm
+++ b/Tools/msi/bundle/Default.thm
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
-    <Window Width="640" Height="382" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
-    <Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
-    <Font Id="1" Height="-24" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
-    <Font Id="2" Height="-22" Weight="500" Foreground="666666" Background="ffffff">Segoe UI</Font>
-    <Font Id="3" Height="-12" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
-    <Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="ffffff" Underline="yes">Segoe UI</Font>
-    <Font Id="5" Height="-12" Weight="500" Foreground="666666" Background="ffffff">Segoe UI</Font>
+    <Window Background="ffff00" Width="640" Height="382" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
+    <Font Id="0" Height="-12" Weight="500">Segoe UI</Font>
+    <Font Id="1" Height="-24" Weight="500">Segoe UI</Font>
+    <Font Id="2" Height="-22" Weight="500" Foreground="666666">Segoe UI</Font>
+    <Font Id="3" Height="-12" Weight="500">Segoe UI</Font>
+    <Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Underline="yes">Segoe UI</Font>
+    <Font Id="5" Height="-12" Weight="500" Foreground="666666">Segoe UI</Font>
 
     <Page Name="Help">
         <Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.HelpHeader)</Text>
@@ -74,7 +74,7 @@
         <Text X="185" Y="241" Width="-11" Height="17" FontId="3">#(loc.CustomLocationLabel)</Text>
         <Editbox Name="TargetDir" X="185" Y="257" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
         <Button Name="CustomBrowseButton" X="-11" Y="256" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.CustomBrowseButton)</Button>
-        <Text Name="CustomBrowseButtonLabel" X="185" Y="281" Width="-91" Height="35" FontId="5" Visible="no">#(loc.CustomLocationHelpLabel)</Text>
+        <Text Name="CustomBrowseButtonLabel" X="185" Y="281" Width="-91" Height="35" FontId="5" HideWhenDisabled="yes">#(loc.CustomLocationHelpLabel)</Text>
 
         <Button Name="Custom2BackButton" X="185" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
         <Button Name="CustomInstallButton" X="-91" Y="-11" Width="95" Height="23" TabStop="yes" FontId="0">#(loc.CustomInstallButton)</Button>
diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
--- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
+++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
@@ -371,7 +371,7 @@
             hr = BalGetNumericVariable(L"WixBundleElevated", &elevated);
             checked = ThemeIsControlChecked(_theme, ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX);
             ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, checked && (FAILED(hr) || !elevated));
-            ThemeShowControl(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, checked ? SW_HIDE : SW_SHOW);
+            ThemeControlEnable(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, !checked);
             ThemeGetTextControl(_theme, ID_TARGETDIR_EDITBOX, &targetDir);
             if (targetDir) {
                 // Check the current value against the default to see
@@ -1489,7 +1489,7 @@
         wc.hInstance = _hModule;
         wc.hIcon = hIcon;
         wc.hCursor = ::LoadCursorW(nullptr, (LPCWSTR)IDC_ARROW);
-        wc.hbrBackground = _theme->rgFonts[_theme->dwFontId].hBackground;
+        wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
         wc.lpszMenuName = nullptr;
         wc.lpszClassName = PYBA_WINDOW_CLASS;
         if (!::RegisterClassW(&wc)) {

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list