mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
COde cleanup
This commit is contained in:
@ -19,7 +19,6 @@ export function getNativeColor(button: buttonModule.Button): colorModule.Color {
|
||||
|
||||
export function getNativeBackgroundColor(button: buttonModule.Button): colorModule.Color {
|
||||
var bkg = <any>button.android.getBackground();
|
||||
var color;
|
||||
if (bkg instanceof background.ad.BorderDrawable) {
|
||||
return (<background.ad.BorderDrawable>bkg).background.color;
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ export function getNativeColor(textField: textFieldModule.TextField): colorModul
|
||||
|
||||
export function getNativeBackgroundColor(textField: textFieldModule.TextField): colorModule.Color {
|
||||
var bkg = <any>textField.android.getBackground();
|
||||
var color;
|
||||
if (bkg instanceof background.ad.BorderDrawable) {
|
||||
return (<background.ad.BorderDrawable>bkg).background.color;
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ export function getNativeColor(textView: textViewModule.TextView): colorModule.C
|
||||
|
||||
export function getNativeBackgroundColor(textView: textViewModule.TextView): colorModule.Color {
|
||||
var bkg = <any>textView.android.getBackground();
|
||||
var color;
|
||||
if (bkg instanceof background.ad.BorderDrawable) {
|
||||
return (<background.ad.BorderDrawable>bkg).background.color;
|
||||
}
|
||||
|
@ -55,7 +55,6 @@ export module ad {
|
||||
set background(value: common.Background) {
|
||||
if (this._background !== value) {
|
||||
this._background = value;
|
||||
|
||||
this.invalidateSelf();
|
||||
}
|
||||
}
|
||||
@ -123,7 +122,8 @@ export module ad {
|
||||
let borderPaint = new android.graphics.Paint();
|
||||
borderPaint.setStyle(android.graphics.Paint.Style.STROKE);
|
||||
borderPaint.setColor(this._borderColor);
|
||||
// Notes double the stroke as the outer part will be clipped
|
||||
|
||||
// Note: Double the stroke as the outer part will be clipped.
|
||||
borderPaint.setStrokeWidth(stroke * 2);
|
||||
canvas.drawRoundRect(boundsF, radius, radius, borderPaint)
|
||||
}
|
||||
|
Reference in New Issue
Block a user