Fix: Text color of the Button not applied, when text-transform has been set.

Resolves #2601
This commit is contained in:
Rossen Hristov
2016-08-22 15:43:45 +03:00
parent 865090af6e
commit 996858825c
6 changed files with 29 additions and 7 deletions

10
apps/.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,10 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": ["-p", "."],
"showOutput": "silent",
"problemMatcher": "$tsc"
}

View File

@ -25,6 +25,7 @@ export function pageLoaded(args: EventData) {
examples.set("clipPath", "css/clip-path");
examples.set("padding", "css/padding");
examples.set("label-background-image", "css/label-background-image");
examples.set("text-transform-and-color", "css/text-transform-and-color");
let viewModel = new SubMianPageViewModel(wrapLayout, examples);
page.bindingContext = viewModel;

View File

@ -0,0 +1,12 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
<StackLayout>
<Label text="Label red" style="color: red;"/>
<Button text="Button red" style="color: red;"/>
<TextField text="TextField red" style="color: red;"/>
<TextView text="TextView red" style="color: red;"/>
<Label text="Label uppercase red" style="text-transform: uppercase; color: red;"/>
<Button text="Button uppercase red" style="text-transform: uppercase; color: red;"/>
<TextField text="TextField uppercase red" style="text-transform: uppercase; color: red;"/>
<TextView text="TextView uppercase red" style="text-transform: uppercase; color: red;"/>
</StackLayout>
</Page>

View File

@ -5,11 +5,11 @@
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.apps",
"tns-android": {
"version": "2.1.1"
},
"tns-ios": {
"version": "2.1.1"
"version": "2.2.1"
},
"tns-android": {
"version": "2.2.0"
}
},
"dependencies": {

View File

@ -6,10 +6,10 @@
"nativescript": {
"id": "org.nativescript.tests",
"tns-ios": {
"version": "2.1.1"
"version": "2.2.1"
},
"tns-android": {
"version": "2.1.1"
"version": "2.2.0"
}
},
"dependencies": {

View File

@ -310,7 +310,6 @@ export class ButtonStyler implements style.Styler {
button.ios.setAttributedTitleForState(result, UIControlState.UIControlStateNormal);
}
else {
button.ios.setAttributedTitleForState(NSMutableAttributedString.alloc().initWithString(source), UIControlState.UIControlStateNormal);
button.ios.setTitleForState(source, UIControlState.UIControlStateNormal);
}
}