Browse Source

Some small fixes

pull/505/head
julodnik 11 years ago
parent
commit
6bd9b45499
  1. 2
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/HighlightingColorizer.cs
  2. 2
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/ModeV2.xsd

2
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/HighlightingColorizer.cs

@ -256,7 +256,7 @@ namespace ICSharpCode.AvalonEdit.Highlighting
if (b != null) if (b != null)
element.BackgroundBrush = b; element.BackgroundBrush = b;
} }
if (color.FontStyle != null || color.FontWeight != null || color.Underline != null) { if (color.FontStyle != null || color.FontWeight != null) {
Typeface tf = element.TextRunProperties.Typeface; Typeface tf = element.TextRunProperties.Typeface;
element.TextRunProperties.SetTypeface(new Typeface( element.TextRunProperties.SetTypeface(new Typeface(
tf.FontFamily, tf.FontFamily,

2
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/ModeV2.xsd

@ -24,6 +24,7 @@
<xsd:simpleType name="FontStyle"> <xsd:simpleType name="FontStyle">
<xsd:restriction base="xsd:string"> <xsd:restriction base="xsd:string">
<xsd:enumeration value="italic"/> <xsd:enumeration value="italic"/>
<xsd:enumeration value="underlined"/>
<xsd:enumeration value="normal"/> <xsd:enumeration value="normal"/>
<xsd:enumeration value="oblique"/> <xsd:enumeration value="oblique"/>
</xsd:restriction> </xsd:restriction>
@ -35,6 +36,7 @@
<xsd:attribute name="background" type="xsd:string" use="optional" /> <xsd:attribute name="background" type="xsd:string" use="optional" />
<xsd:attribute name="fontWeight" type="FontWeight" use="optional" /> <xsd:attribute name="fontWeight" type="FontWeight" use="optional" />
<xsd:attribute name="fontStyle" type="FontStyle" use="optional" /> <xsd:attribute name="fontStyle" type="FontStyle" use="optional" />
<xsd:attribute name="underline" type="xsd:boolean" use="optional" />
<xsd:anyAttribute namespace="##other" processContents="lax" /> <xsd:anyAttribute namespace="##other" processContents="lax" />
</xsd:attributeGroup> </xsd:attributeGroup>

Loading…
Cancel
Save