mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 11:17:04 +08:00
Fix: Text color of the Button not applied, when text-transform has been set.
Resolves #2601
This commit is contained in:
10
apps/.vscode/tasks.json
vendored
Normal file
10
apps/.vscode/tasks.json
vendored
Normal 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"
|
||||
}
|
@ -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;
|
||||
|
12
apps/app/ui-tests-app/css/text-transform-and-color.xml
Normal file
12
apps/app/ui-tests-app/css/text-transform-and-color.xml
Normal 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>
|
@ -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": {
|
||||
|
@ -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": {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user