Mass replace fontAttributes with fontWeight and fontStyle

This commit is contained in:
Panayot Cankov
2017-02-23 17:09:19 +02:00
parent 0f819be6a7
commit 06970d058a
5 changed files with 22 additions and 22 deletions

View File

@ -9,11 +9,11 @@
<StackLayout orientation="horizontal" row="1">
<Label margin="2">
<Label.formattedText>
<FormattedString fontSize="20" foregroundColor="#C6C6C6">
<FormattedString fontSize="20" color="#C6C6C6">
<FormattedString.spans>
<Span text="{{ author ? 'by ' + author : '' }}"/>
<Span text="{{ num_comments ? ' | ' : '' }}" />
<Span text="{{ num_comments ? num_comments + ' comments' : '' }}" foregroundColor="#10C2B0"/>
<Span text="{{ num_comments ? num_comments + ' comments' : '' }}" color="#10C2B0"/>
</FormattedString.spans>
</FormattedString>
</Label.formattedText>

View File

@ -6,8 +6,8 @@
<Label.formattedText>
<FormattedString>
<FormattedString.spans>
<Span text="label" fontAttributes="Bold" foregroundColor="#0000ff" />
<Span text="Label" fontAttributes="Italic" foregroundColor="#00ff00" />
<Span text="label" fontWeight="bold" color="#0000ff" />
<Span text="Label" fontStyle="italic" color="#00ff00" />
</FormattedString.spans>
</FormattedString>
</Label.formattedText>
@ -16,8 +16,8 @@
<Label.formattedText>
<FormattedString>
<FormattedString.spans>
<Span text="label" fontAttributes="Bold" foregroundColor="#0000ff" />
<Span text="Label" fontAttributes="Italic" foregroundColor="#00ff00" />
<Span text="label" fontWeight="bold" color="#0000ff" />
<Span text="Label" fontStyle="italic" color="#00ff00" />
</FormattedString.spans>
</FormattedString>
</Label.formattedText>
@ -28,8 +28,8 @@
<Button.formattedText>
<FormattedString>
<FormattedString.spans>
<Span text="button" fontAttributes="Bold" foregroundColor="#0000ff" />
<Span text="Button" fontAttributes="Italic" foregroundColor="#00ff00" />
<Span text="button" fontWeight="bold" color="#0000ff" />
<Span text="Button" fontStyle="italic" color="#00ff00" />
</FormattedString.spans>
</FormattedString>
</Button.formattedText>
@ -38,8 +38,8 @@
<Button.formattedText>
<FormattedString>
<FormattedString.spans>
<Span text="button" fontAttributes="Bold" foregroundColor="#0000ff" />
<Span text="Button" fontAttributes="Italic" foregroundColor="#00ff00" />
<Span text="button" fontWeight="bold" color="#0000ff" />
<Span text="Button" fontStyle="italic" color="#00ff00" />
</FormattedString.spans>
</FormattedString>
</Button.formattedText>
@ -50,8 +50,8 @@
<TextField.formattedText>
<FormattedString>
<FormattedString.spans>
<Span text="text" fontAttributes="Bold" foregroundColor="#0000ff" />
<Span text="Field" fontAttributes="Italic" foregroundColor="#00ff00" />
<Span text="text" fontWeight="bold" color="#0000ff" />
<Span text="Field" fontStyle="italic" color="#00ff00" />
</FormattedString.spans>
</FormattedString>
</TextField.formattedText>
@ -60,8 +60,8 @@
<TextField.formattedText>
<FormattedString>
<FormattedString.spans>
<Span text="text" fontAttributes="Bold" foregroundColor="#0000ff" />
<Span text="Field" fontAttributes="Italic" foregroundColor="#00ff00" />
<Span text="text" fontWeight="bold" color="#0000ff" />
<Span text="Field" fontStyle="italic" color="#00ff00" />
</FormattedString.spans>
</FormattedString>
</TextField.formattedText>
@ -72,8 +72,8 @@
<TextView.formattedText>
<FormattedString>
<FormattedString.spans>
<Span text="text" fontAttributes="Bold" foregroundColor="#0000ff" />
<Span text="View" fontAttributes="Italic" foregroundColor="#00ff00" />
<Span text="text" fontWeight="bold" color="#0000ff" />
<Span text="View" fontStyle="italic" color="#00ff00" />
</FormattedString.spans>
</FormattedString>
</TextView.formattedText>
@ -82,8 +82,8 @@
<TextView.formattedText>
<FormattedString>
<FormattedString.spans>
<Span text="text" fontAttributes="Bold" foregroundColor="#0000ff" />
<Span text="View" fontAttributes="Italic" foregroundColor="#00ff00" />
<Span text="text" fontWeight="bold" color="#0000ff" />
<Span text="View" fontStyle="italic" color="#00ff00" />
</FormattedString.spans>
</FormattedString>
</TextView.formattedText>

View File

@ -2,7 +2,7 @@
<StackLayout>
<Label margin="2">
<Label.formattedText>
<FormattedString foregroundColor="White">
<FormattedString color="White">
<FormattedString.spans>
<Span text="FormattedString foregroundColor cannot be set to named color" />
<Span text="https://github.com/NativeScript/cross-platform-modules/issues/86"/>