Move ImageList element back under Theme since it's not a control.
Sean Hall committed
Nov 10, 2021 at 14:37 UTC
0013447068dfde42c60fa802e5387e9bc4d0b2e2
3 files changed
+16
-14
src/libs/dutil/WixToolset.DUtil/thmutil.cpp
+4
-4
@@ -1834,6 +1834,10 @@ static HRESULT ParseTheme(
1834
hr = ParseImages(hModule, wzRelativePath, pThemeElement, pTheme);
1835
ThmExitOnFailure(hr, "Failed to parse theme images.");
1836
1837
+ // Parse any image lists.
1838
+ hr = ParseImageLists(hModule, wzRelativePath, pThemeElement, pTheme);
1839
+ ThmExitOnFailure(hr, "Failed to parse image lists.");
1840
+
1841
// Parse the window element.
1842
hr = ParseWindow(hModule, wzRelativePath, pThemeElement, pTheme);
1843
ThmExitOnFailure(hr, "Failed to parse theme window element.");
@@ -2598,10 +2602,6 @@ static HRESULT ParseWindow(
2602
ThmExitWithRootFailure(hr, E_INVALIDDATA, "Window elements must contain either the Caption or StringId attribute.");
2603
}
2604
2601
- // Parse any image lists.
2602
- hr = ParseImageLists(hModule, wzRelativePath, pixn, pTheme);
2603
- ThmExitOnFailure(hr, "Failed to parse image lists.");
2604
-
2605
// Parse the pages.
2606
hr = ParsePages(hModule, wzRelativePath, pixn, pTheme);
2607
ThmExitOnFailure(hr, "Failed to parse theme pages.");
src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml
+6
-5
@@ -28,12 +28,13 @@
28
<Image Id="progressbar" ImageResource="30" />
29
<Image Id="progressbar_reverse" ImageResource="31" />
30
31
+ <ImageList Name="Stars">
32
+ <ImageListItem ImageResource="2" />
33
+ <ImageListItem ImageResource="3" />
34
+ <ImageListItem ImageResource="4" />
35
+ </ImageList>
36
+
37
<Window Width="600" Height="450" FontId="Default" Caption="BafThmUtilTestingTheme" HexStyle="10cf0000" AutoResize="yes">
32
- <ImageList Name="Stars">
33
- <ImageListItem ImageResource="2" />
34
- <ImageListItem ImageResource="3" />
35
- <ImageListItem ImageResource="4" />
36
- </ImageList>
38
<Page Name="Transparency">
39
<Label X="6" Y="6" Width="-6" Height="94" FontId="Default">
40
This page has three versions of an image. The top image is a bitmap with a transparent background, the yellow star should be visible but its black background should not (this is currently broken). The middle image is the same bitmap except the black background is fully opaque so the yellow star should be visible on a black background. The bottom image in a PNG version of the top image and should look exactly the same.
src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingThemeLoose.xml
+6
-5
@@ -28,12 +28,13 @@
28
<Image Id="progressbar" ImageFile="progressbar.bmp" />
29
<Image Id="progressbar_reverse" ImageFile="progressbar_reverse.bmp" />
30
31
+ <ImageList Name="Stars">
32
+ <ImageListItem ImageFile="star_transparent.bmp" />
33
+ <ImageListItem ImageFile="star_opaque.bmp" />
34
+ <ImageListItem ImageFile="star_transparent.png" />
35
+ </ImageList>
36
+
37
<Window Width="600" Height="450" FontId="Default" Caption="BafThmUtilTestingTheme" HexStyle="10cf0000" AutoResize="yes">
32
- <ImageList Name="Stars">
33
- <ImageListItem ImageFile="star_transparent.bmp" />
34
- <ImageListItem ImageFile="star_opaque.bmp" />
35
- <ImageListItem ImageFile="star_transparent.png" />
36
- </ImageList>
38
<Page Name="Transparency">
39
<Label X="6" Y="6" Width="-6" Height="94" FontId="Default">
40
This page has three versions of an image. The top image is a bitmap with a transparent background, the yellow star should be visible but its black background should not (this is currently broken). The middle image is the same bitmap except the black background is fully opaque so the yellow star should be visible on a black background. The bottom image in a PNG version of the top image and should look exactly the same.