@@ -2,7 +2,15 @@ import { htmlProperty, LabelBase, lineBreakProperty, maxLinesProperty, textShado
2
2
import { layout } from 'tns-core-modules/utils/utils' ;
3
3
import { fontInternalProperty , Length , paddingBottomProperty , paddingLeftProperty , paddingRightProperty , paddingTopProperty , View } from 'tns-core-modules/ui/page/page' ;
4
4
import { Font } from 'tns-core-modules/ui/styling/font' ;
5
- import { TextTransform , WhiteSpace , whiteSpaceProperty } from 'tns-core-modules/ui/text-base/text-base' ;
5
+ import {
6
+ borderBottomWidthProperty ,
7
+ borderLeftWidthProperty ,
8
+ borderRightWidthProperty ,
9
+ borderTopWidthProperty ,
10
+ TextTransform ,
11
+ WhiteSpace ,
12
+ whiteSpaceProperty
13
+ } from 'tns-core-modules/ui/text-base/text-base' ;
6
14
import { TextShadow } from './label' ;
7
15
import { isString } from 'tns-core-modules/utils/types' ;
8
16
@@ -461,6 +469,55 @@ export class Label extends LabelBase {
461
469
right : inset . right
462
470
} ;
463
471
}
472
+
473
+ [ borderTopWidthProperty . getDefault ] ( ) : Length {
474
+ return {
475
+ value : this . nativeTextViewProtected . textContainerInset . top ,
476
+ unit : 'px'
477
+ } ;
478
+ }
479
+ [ borderTopWidthProperty . setNative ] ( value : Length ) {
480
+ const inset = this . nativeTextViewProtected . textContainerInset ;
481
+ const top = layout . toDeviceIndependentPixels ( this . effectivePaddingTop + this . effectiveBorderTopWidth ) ;
482
+ this . nativeTextViewProtected . textContainerInset = { top, left : inset . left , bottom : inset . bottom , right : inset . right } ;
483
+ }
484
+
485
+ [ borderRightWidthProperty . getDefault ] ( ) : Length {
486
+ return {
487
+ value : this . nativeTextViewProtected . textContainerInset . right ,
488
+ unit : 'px'
489
+ } ;
490
+ }
491
+ [ borderRightWidthProperty . setNative ] ( value : Length ) {
492
+ const inset = this . nativeTextViewProtected . textContainerInset ;
493
+ const right = layout . toDeviceIndependentPixels ( this . effectivePaddingRight + this . effectiveBorderRightWidth ) ;
494
+ this . nativeTextViewProtected . textContainerInset = { top : inset . top , left : inset . left , bottom : inset . bottom , right } ;
495
+ }
496
+
497
+ [ borderBottomWidthProperty . getDefault ] ( ) : Length {
498
+ return {
499
+ value : this . nativeTextViewProtected . textContainerInset . bottom ,
500
+ unit : 'px'
501
+ } ;
502
+ }
503
+ [ borderBottomWidthProperty . setNative ] ( value : Length ) {
504
+ const inset = this . nativeTextViewProtected . textContainerInset ;
505
+ const bottom = layout . toDeviceIndependentPixels ( this . effectivePaddingBottom + this . effectiveBorderBottomWidth ) ;
506
+ this . nativeTextViewProtected . textContainerInset = { top : inset . top , left : inset . left , bottom, right : inset . right } ;
507
+ }
508
+
509
+ [ borderLeftWidthProperty . getDefault ] ( ) : Length {
510
+ return {
511
+ value : this . nativeTextViewProtected . textContainerInset . left ,
512
+ unit : 'px'
513
+ } ;
514
+ }
515
+ [ borderLeftWidthProperty . setNative ] ( value : Length ) {
516
+ const inset = this . nativeTextViewProtected . textContainerInset ;
517
+ const left = layout . toDeviceIndependentPixels ( this . effectivePaddingLeft + this . effectiveBorderLeftWidth ) ;
518
+ this . nativeTextViewProtected . textContainerInset = { top : inset . top , left, bottom : inset . bottom , right : inset . right } ;
519
+ }
520
+
464
521
[ maxLinesProperty . getDefault ] ( ) : number | string {
465
522
return 'none' ;
466
523
}
0 commit comments