diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-10-18 11:30:10 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2019-10-18 11:34:46 -0700 |
| commit | 6155da0bc9e7faa97612d15def98dd68ea2557cd (patch) | |
| tree | d2a6d9f4c4898b84982f941848b02e4f7ffed037 /src/WixToolset.Core/Compiler_UI.cs | |
| parent | 7d699fdbbe8a15c72b69f633ac9799fb757e2acc (diff) | |
| download | wix-6155da0bc9e7faa97612d15def98dd68ea2557cd.tar.gz wix-6155da0bc9e7faa97612d15def98dd68ea2557cd.tar.bz2 wix-6155da0bc9e7faa97612d15def98dd68ea2557cd.zip | |
Small tuple based fixes
Diffstat (limited to 'src/WixToolset.Core/Compiler_UI.cs')
| -rw-r--r-- | src/WixToolset.Core/Compiler_UI.cs | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/src/WixToolset.Core/Compiler_UI.cs b/src/WixToolset.Core/Compiler_UI.cs index 6b933d09..30bb7ab6 100644 --- a/src/WixToolset.Core/Compiler_UI.cs +++ b/src/WixToolset.Core/Compiler_UI.cs | |||
| @@ -746,7 +746,9 @@ namespace WixToolset.Core | |||
| 746 | { | 746 | { |
| 747 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 747 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); |
| 748 | Identifier id = null; | 748 | Identifier id = null; |
| 749 | var color = CompilerConstants.IntegerNotSet; | 749 | int? red = null; |
| 750 | int? green = null; | ||
| 751 | int? blue = null; | ||
| 750 | var bold = false; | 752 | var bold = false; |
| 751 | var italic = false; | 753 | var italic = false; |
| 752 | var strike = false; | 754 | var strike = false; |
| @@ -769,42 +771,21 @@ namespace WixToolset.Core | |||
| 769 | var redColor = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Byte.MaxValue); | 771 | var redColor = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Byte.MaxValue); |
| 770 | if (CompilerConstants.IllegalInteger != redColor) | 772 | if (CompilerConstants.IllegalInteger != redColor) |
| 771 | { | 773 | { |
| 772 | if (CompilerConstants.IntegerNotSet == color) | 774 | red = redColor; |
| 773 | { | ||
| 774 | color = redColor; | ||
| 775 | } | ||
| 776 | else | ||
| 777 | { | ||
| 778 | color += redColor; | ||
| 779 | } | ||
| 780 | } | 775 | } |
| 781 | break; | 776 | break; |
| 782 | case "Green": | 777 | case "Green": |
| 783 | var greenColor = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Byte.MaxValue); | 778 | var greenColor = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Byte.MaxValue); |
| 784 | if (CompilerConstants.IllegalInteger != greenColor) | 779 | if (CompilerConstants.IllegalInteger != greenColor) |
| 785 | { | 780 | { |
| 786 | if (CompilerConstants.IntegerNotSet == color) | 781 | green = greenColor; |
| 787 | { | ||
| 788 | color = greenColor * 256; | ||
| 789 | } | ||
| 790 | else | ||
| 791 | { | ||
| 792 | color += greenColor * 256; | ||
| 793 | } | ||
| 794 | } | 782 | } |
| 795 | break; | 783 | break; |
| 796 | case "Blue": | 784 | case "Blue": |
| 797 | var blueColor = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Byte.MaxValue); | 785 | var blueColor = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Byte.MaxValue); |
| 798 | if (CompilerConstants.IllegalInteger != blueColor) | 786 | if (CompilerConstants.IllegalInteger != blueColor) |
| 799 | { | 787 | { |
| 800 | if (CompilerConstants.IntegerNotSet == color) | 788 | blue = blueColor; |
| 801 | { | ||
| 802 | color = blueColor * 65536; | ||
| 803 | } | ||
| 804 | else | ||
| 805 | { | ||
| 806 | color += blueColor * 65536; | ||
| 807 | } | ||
| 808 | } | 789 | } |
| 809 | break; | 790 | break; |
| 810 | 791 | ||
| @@ -843,7 +824,7 @@ namespace WixToolset.Core | |||
| 843 | 824 | ||
| 844 | if (null == id) | 825 | if (null == id) |
| 845 | { | 826 | { |
| 846 | this.Core.CreateIdentifier("txs", faceName, size.ToString(), color.ToString(), bold.ToString(), italic.ToString(), strike.ToString(), underline.ToString()); | 827 | this.Core.CreateIdentifier("txs", faceName, size.ToString(), (red ?? 0).ToString(), (green ?? 0).ToString(), (blue ?? 0).ToString(), bold.ToString(), italic.ToString(), strike.ToString(), underline.ToString()); |
| 847 | } | 828 | } |
| 848 | 829 | ||
| 849 | if (null == faceName) | 830 | if (null == faceName) |
| @@ -858,7 +839,9 @@ namespace WixToolset.Core | |||
| 858 | var tuple = new TextStyleTuple(sourceLineNumbers, id) | 839 | var tuple = new TextStyleTuple(sourceLineNumbers, id) |
| 859 | { | 840 | { |
| 860 | FaceName = faceName, | 841 | FaceName = faceName, |
| 861 | Color = color, | 842 | Red = red, |
| 843 | Green = green, | ||
| 844 | Blue = blue, | ||
| 862 | Bold = bold, | 845 | Bold = bold, |
| 863 | Italic = italic, | 846 | Italic = italic, |
| 864 | Strike = strike, | 847 | Strike = strike, |
