border props added to view

This commit is contained in:
Vladimir Enchev
2015-06-11 11:55:58 +03:00
parent d66cf0fab8
commit 9b934432aa
5 changed files with 262 additions and 0 deletions

View File

@@ -187,6 +187,26 @@ export class View extends proxy.ProxyObject implements definition.View {
}
// START Style property shortcuts
get borderRadius(): number {
return this.style.borderRadius;
}
set borderRadius(value: number) {
this.style.borderRadius = value;
}
get borderWidth(): number {
return this.style.borderWidth;
}
set borderWidth(value: number) {
this.style.borderWidth = value;
}
get borderColor(): color.Color {
return this.style.borderColor;
}
set borderColor(value: color.Color) {
this.style.borderColor = value;
}
get color(): color.Color {
return this.style.color;

15
ui/core/view.d.ts vendored
View File

@@ -95,6 +95,21 @@ declare module "ui/core/view" {
* A View occupies a rectangular area on the screen and is responsible for drawing and layouting of all UI components within.
*/
export class View extends proxy.ProxyObject {
/**
* Gets or sets the corner radius of the view.
*/
borderRadius: number;
/**
* Gets or sets the border width of the view.
*/
borderWidth: number;
/**
* Gets or sets the border color of the view.
*/
borderColor: color.Color;
/**
* String value used when hooking to loaded event.
*/