diff --git a/apps/.vscode/tasks.json b/apps/.vscode/tasks.json
new file mode 100644
index 000000000..926b1ddcd
--- /dev/null
+++ b/apps/.vscode/tasks.json
@@ -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"
+}
\ No newline at end of file
diff --git a/apps/app/ui-tests-app/css/main-page.ts b/apps/app/ui-tests-app/css/main-page.ts
index e4531ace5..d0f64ab21 100644
--- a/apps/app/ui-tests-app/css/main-page.ts
+++ b/apps/app/ui-tests-app/css/main-page.ts
@@ -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("transform-decoration-color", "css/transform-decoration-color");
let viewModel = new SubMianPageViewModel(wrapLayout, examples);
page.bindingContext = viewModel;
diff --git a/apps/app/ui-tests-app/css/transform-decoration-color.css b/apps/app/ui-tests-app/css/transform-decoration-color.css
new file mode 100644
index 000000000..64d5bb506
--- /dev/null
+++ b/apps/app/ui-tests-app/css/transform-decoration-color.css
@@ -0,0 +1,8 @@
+Label, Button, TextField, TextView {
+ font-size: 12;
+ text-align: left;
+}
+
+TextView {
+ margin-bottom: 10;
+}
\ No newline at end of file
diff --git a/apps/app/ui-tests-app/css/transform-decoration-color.xml b/apps/app/ui-tests-app/css/transform-decoration-color.xml
new file mode 100644
index 000000000..4a1d8d55c
--- /dev/null
+++ b/apps/app/ui-tests-app/css/transform-decoration-color.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/package.json b/apps/package.json
index c5f563c87..38f30df87 100644
--- a/apps/package.json
+++ b/apps/package.json
@@ -5,11 +5,11 @@
"repository": "",
"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": {
diff --git a/tests/package.json b/tests/package.json
index cca777fa5..6c20e7169 100644
--- a/tests/package.json
+++ b/tests/package.json
@@ -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": {
diff --git a/tns-core-modules/ui/button/button.ios.ts b/tns-core-modules/ui/button/button.ios.ts
index 9954b1b85..361f3dc92 100644
--- a/tns-core-modules/ui/button/button.ios.ts
+++ b/tns-core-modules/ui/button/button.ios.ts
@@ -279,11 +279,10 @@ export class ButtonStyler implements style.Styler {
let attributes = new Array();
let range = { location: 0, length: source.length };
- var decorationValues = (decoration + "").split(" ");
+ let decorationValues = (decoration + "").split(" ");
+ let dict = new Map();
if (decorationValues.indexOf(enums.TextDecoration.none) === -1 || hasLetterSpacing) {
- let dict = new Map();
-
if (decorationValues.indexOf(enums.TextDecoration.underline) !== -1) {
dict.set(NSUnderlineStyleAttributeName, NSUnderlineStyle.NSUnderlineStyleSingle);
}
@@ -295,14 +294,21 @@ export class ButtonStyler implements style.Styler {
if (hasLetterSpacing) {
dict.set(NSKernAttributeName, letterSpacing * button.ios.font.pointSize);
}
+ }
+ let buttonColor = button.style.color;
+ if (buttonColor){
+ dict.set(NSForegroundColorAttributeName, buttonColor.ios);
+ }
+
+ if (dict.size > 0){
attributes.push({ attrs: dict, range: NSValue.valueWithRange(range) });
}
source = utils.ios.getTransformedText(button, source, transform);
+ let result = NSMutableAttributedString.alloc().initWithString(source);
if (attributes.length > 0) {
- let result = NSMutableAttributedString.alloc().initWithString(source);
for (let i = 0; i < attributes.length; i++) {
result.setAttributesRange(attributes[i]["attrs"], attributes[i]["range"].rangeValue);
}
@@ -310,7 +316,7 @@ export class ButtonStyler implements style.Styler {
button.ios.setAttributedTitleForState(result, UIControlState.UIControlStateNormal);
}
else {
- button.ios.setAttributedTitleForState(NSMutableAttributedString.alloc().initWithString(source), UIControlState.UIControlStateNormal);
+ button.ios.setAttributedTitleForState(result, UIControlState.UIControlStateNormal);
button.ios.setTitleForState(source, UIControlState.UIControlStateNormal);
}
}