Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c30a6ce

Browse files
committed
Issue #24293: Fixes installer colors to use system settings throughout.
1 parent e328323 commit c30a6ce

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

Tools/msi/bundle/Default.thm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
3-
<Window Width="640" Height="382" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
4-
<Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
5-
<Font Id="1" Height="-24" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
6-
<Font Id="2" Height="-22" Weight="500" Foreground="666666" Background="ffffff">Segoe UI</Font>
7-
<Font Id="3" Height="-12" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
8-
<Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="ffffff" Underline="yes">Segoe UI</Font>
9-
<Font Id="5" Height="-12" Weight="500" Foreground="666666" Background="ffffff">Segoe UI</Font>
3+
<Window Background="ffff00" Width="640" Height="382" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
4+
<Font Id="0" Height="-12" Weight="500">Segoe UI</Font>
5+
<Font Id="1" Height="-24" Weight="500">Segoe UI</Font>
6+
<Font Id="2" Height="-22" Weight="500" Foreground="666666">Segoe UI</Font>
7+
<Font Id="3" Height="-12" Weight="500">Segoe UI</Font>
8+
<Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Underline="yes">Segoe UI</Font>
9+
<Font Id="5" Height="-12" Weight="500" Foreground="666666">Segoe UI</Font>
1010

1111
<Page Name="Help">
1212
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.HelpHeader)</Text>
@@ -74,7 +74,7 @@
7474
<Text X="185" Y="241" Width="-11" Height="17" FontId="3">#(loc.CustomLocationLabel)</Text>
7575
<Editbox Name="TargetDir" X="185" Y="257" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
7676
<Button Name="CustomBrowseButton" X="-11" Y="256" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.CustomBrowseButton)</Button>
77-
<Text Name="CustomBrowseButtonLabel" X="185" Y="281" Width="-91" Height="35" FontId="5" Visible="no">#(loc.CustomLocationHelpLabel)</Text>
77+
<Text Name="CustomBrowseButtonLabel" X="185" Y="281" Width="-91" Height="35" FontId="5" HideWhenDisabled="yes">#(loc.CustomLocationHelpLabel)</Text>
7878

7979
<Button Name="Custom2BackButton" X="185" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
8080
<Button Name="CustomInstallButton" X="-91" Y="-11" Width="95" Height="23" TabStop="yes" FontId="0">#(loc.CustomInstallButton)</Button>

Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
371371
hr = BalGetNumericVariable(L"WixBundleElevated", &elevated);
372372
checked = ThemeIsControlChecked(_theme, ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX);
373373
ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, checked && (FAILED(hr) || !elevated));
374-
ThemeShowControl(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, checked ? SW_HIDE : SW_SHOW);
374+
ThemeControlEnable(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, !checked);
375375
ThemeGetTextControl(_theme, ID_TARGETDIR_EDITBOX, &targetDir);
376376
if (targetDir) {
377377
// Check the current value against the default to see
@@ -1489,7 +1489,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
14891489
wc.hInstance = _hModule;
14901490
wc.hIcon = hIcon;
14911491
wc.hCursor = ::LoadCursorW(nullptr, (LPCWSTR)IDC_ARROW);
1492-
wc.hbrBackground = _theme->rgFonts[_theme->dwFontId].hBackground;
1492+
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
14931493
wc.lpszMenuName = nullptr;
14941494
wc.lpszClassName = PYBA_WINDOW_CLASS;
14951495
if (!::RegisterClassW(&wc)) {

0 commit comments

Comments
 (0)