Skip to content

Commit 03d031a

Browse files
committed
2.4 Style fixes
1 parent 2a42d17 commit 03d031a

File tree

7 files changed

+11
-101
lines changed

7 files changed

+11
-101
lines changed

app/App_Resources/iOS/Info.plist

Lines changed: 0 additions & 47 deletions
This file was deleted.

checkbox.android.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CheckBoxInterface } from "./checkbox";
1+
import { CheckBoxInterface } from "./";
22
import { View } from "ui/core/view";
33
import { Color } from "color";
44
import { isAndroid, device } from "platform";
@@ -198,15 +198,10 @@ export class CheckBoxStyler implements style.Styler {
198198
CheckBoxStyler.setFontInternalProperty,
199199
CheckBoxStyler.resetFontInternalProperty,
200200
CheckBoxStyler.getNativeFontInternalValue), "CheckBox");
201-
/*
201+
202202
style.registerHandler(style.backgroundColorProperty, new style.StylePropertyChangedHandler(
203203
CheckBoxStyler.setColorLabelProperty,
204204
CheckBoxStyler.resetColorProperty), "CheckBox");
205-
*/
206-
207-
/*style.registerHandler(style.borderWidthProperty, style.ignorePropertyHandler, "CheckBox");*/ //removed for 2.4+
208-
style.registerHandler(style.borderColorProperty, style.ignorePropertyHandler, "CheckBox");
209-
style.registerHandler(style.borderRadiusProperty, style.ignorePropertyHandler, "CheckBox");
210205
}
211206
}
212207

checkbox.ios.ts

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference path="BEMCheckBox.d.ts" /> Needed for autocompletion and compilation.
22

3-
import {CheckBoxInterface} from "./checkbox";
3+
import {CheckBoxInterface} from "./";
44
import { View } from "ui/core/view";
55
import {ContentView} from "ui/content-view";
66
import { Property, PropertyChangeData } from "ui/core/dependency-observable";
@@ -270,35 +270,3 @@ class BEMCheckBoxDelegateImpl extends NSObject implements BEMCheckBoxDelegate {
270270
}
271271
}
272272
}
273-
274-
export class CheckBoxStyler implements style.Styler {
275-
private static setBorderColorProperty(view: any, newValue: any) {
276-
if (view.nativeiOSCheckBox){
277-
try{
278-
var color = new Color(newValue);
279-
view.nativeiOSCheckBox.tintColor = color.ios;
280-
}catch(error){
281-
//Do nothing, catch bad color value
282-
}
283-
}
284-
}
285-
286-
private static setBorderWidthProperty(view: any, newValue: any) {
287-
if (view.nativeiOSCheckBox){
288-
view.nativeiOSCheckBox.lineWidth = newValue;
289-
}
290-
}
291-
292-
private static resetColorProperty(view: View, nativeValue: number) {
293-
// Do nothing.
294-
}
295-
296-
public static registerHandlers() {
297-
style.registerHandler(style.borderColorProperty, new style.StylePropertyChangedHandler(CheckBoxStyler.setBorderColorProperty, CheckBoxStyler.resetColorProperty), "CheckBox");
298-
/* style.registerHandler(style.borderWidthProperty, new style.StylePropertyChangedHandler(CheckBoxStyler.setBorderWidthProperty, CheckBoxStyler.resetColorProperty), "CheckBox"); */ //removed for 2.4+
299-
300-
style.registerHandler(style.borderRadiusProperty, style.ignorePropertyHandler, "CheckBox");
301-
}
302-
}
303-
304-
CheckBoxStyler.registerHandlers();

demo/app/app.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ Label {
5353
CheckBox{
5454
vertical-align: center;
5555
color: white;
56-
border-color: yellow;
57-
border-width: 1;
5856
font-size: 20;
5957
}
6058

demo/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"nativescript": {
33
"id": "org.nativescript.demo",
44
"tns-android": {
5-
"version": "2.3.0"
5+
"version": "2.4.0"
66
},
77
"tns-ios": {
8-
"version": "2.3.0"
8+
"version": "2.4.0"
99
}
1010
},
1111
"dependencies": {
1212
"nativescript-checkbox": "file:..",
13-
"tns-core-modules": "^2.3.0"
13+
"tns-core-modules": "^2.4.0"
1414
},
1515
"devDependencies": {
1616
"babel-traverse": "6.7.6",
@@ -20,6 +20,6 @@
2020
"lazy": "1.0.11",
2121
"nativescript-dev-typescript": "^0.3.2",
2222
"typescript": "^1.8.10",
23-
"tns-platform-declarations": "2.0.0"
23+
"tns-platform-declarations": "^2.0.0"
2424
}
2525
}

package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
"version": "1.1.6",
44
"description": "NativeScript plugin for checkbox widget.",
55
"main": "checkbox.js",
6-
"typings": "index.d.ts",
76
"nativescript": {
87
"platforms": {
9-
"android": "2.3.0",
10-
"ios": "2.3.0"
8+
"android": "2.4.0",
9+
"ios": "2.4.0"
1110
}
1211
},
1312
"scripts": {
@@ -56,10 +55,7 @@
5655
"bugs": {
5756
"url": "https://github.com/bradmartin/nativescript-checkbox/issues"
5857
},
59-
"license": {
60-
"type": "MIT",
61-
"url": "https://github.com/bradmartin/nativescript-checkbox/blob/master/LICENSE"
62-
},
58+
"license":"MIT",
6359
"homepage": "https://github.com/bradmartin/nativescript-checkbox",
6460
"readmeFilename": "README.md",
6561
"devDependencies": {

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"files": [
1212
"demo/node_modules/tns-core-modules/tns-core-modules.d.ts",
13-
"node_modules/tns-platform-declarations/android17.d.ts",
13+
"node_modules/tns-platform-declarations/android.d.ts",
1414
"node_modules/tns-platform-declarations/ios.d.ts",
1515
"BEMCheckBox.d.ts",
1616
"checkbox.android.ts",

0 commit comments

Comments
 (0)