@@ -14,74 +14,92 @@ class HierarchicTextAttributeProvider(
1414 private val parentTextAttributes : TextAttributes ? ,
1515 private val textAttributes : TextAttributes
1616) : EffectiveTextAttributeProvider {
17- override fun getTextTransform (): TextTransform = textAttributes.textTransform
17+ override val textTransform: TextTransform
18+ get() = textAttributes.textTransform
1819
19- override fun getRole (): ReactAccessibilityDelegate .Role ? = textShadowNode.role
20+ override val role: ReactAccessibilityDelegate .Role ?
21+ get() = textShadowNode.role
2022
21- override fun getAccessibilityRole () : ReactAccessibilityDelegate .AccessibilityRole ? =
22- textShadowNode.accessibilityRole
23+ override val accessibilityRole : ReactAccessibilityDelegate .AccessibilityRole ?
24+ get() = textShadowNode.accessibilityRole
2325
24- override fun isBackgroundColorSet (): Boolean = textShadowNode.isBackgroundColorSet
26+ override val isBackgroundColorSet: Boolean
27+ get() = textShadowNode.isBackgroundColorSet
2528
26- override fun getBackgroundColor (): Int = textShadowNode.backgroundColor
29+ override val backgroundColor: Int
30+ get() = textShadowNode.backgroundColor
2731
28- override fun isColorSet (): Boolean = textShadowNode.isColorSet
32+ override val isColorSet: Boolean
33+ get() = textShadowNode.isColorSet
2934
30- override fun getColor (): Int = textShadowNode.color
35+ override val color: Int
36+ get() = textShadowNode.color
3137
32- override fun getFontStyle (): Int = textShadowNode.fontStyle
38+ override val fontStyle: Int
39+ get() = textShadowNode.fontStyle
3340
34- override fun getFontWeight (): Int = textShadowNode.fontWeight
41+ override val fontWeight: Int
42+ get() = textShadowNode.fontWeight
3543
36- override fun getFontFamily (): String = textShadowNode.fontFamily
44+ override val fontFamily: String
45+ get() = textShadowNode.fontFamily
3746
38- override fun getFontFeatureSettings (): String = textShadowNode.fontFeatureSettings
47+ override val fontFeatureSettings: String
48+ get() = textShadowNode.fontFeatureSettings
3949
40- override fun isUnderlineTextDecorationSet (): Boolean = textShadowNode.isUnderlineTextDecorationSet
50+ override val isUnderlineTextDecorationSet: Boolean
51+ get() = textShadowNode.isUnderlineTextDecorationSet
4152
42- override fun isLineThroughTextDecorationSet () : Boolean =
43- textShadowNode.isLineThroughTextDecorationSet
53+ override val isLineThroughTextDecorationSet: Boolean
54+ get() = textShadowNode.isLineThroughTextDecorationSet
4455
45- override fun getTextShadowOffsetDx (): Float = textShadowNode.textShadowOffsetDx
56+ override val textShadowOffsetDx: Float
57+ get() = textShadowNode.textShadowOffsetDx
4658
47- override fun getTextShadowOffsetDy (): Float = textShadowNode.textShadowOffsetDy
59+ override val textShadowOffsetDy: Float
60+ get() = textShadowNode.textShadowOffsetDy
4861
49- override fun getTextShadowRadius (): Float = textShadowNode.textShadowRadius
62+ override val textShadowRadius: Float
63+ get() = textShadowNode.textShadowRadius
5064
51- override fun getTextShadowColor (): Int = textShadowNode.textShadowColor
65+ override val textShadowColor: Int
66+ get() = textShadowNode.textShadowColor
5267
53- override fun getEffectiveLetterSpacing (): Float {
54- val letterSpacing = textAttributes.effectiveLetterSpacing
68+ override val effectiveLetterSpacing: Float
69+ get() {
70+ val letterSpacing = textAttributes.effectiveLetterSpacing
5571
56- val isParentLetterSpacingDifferent =
57- parentTextAttributes == null || parentTextAttributes.effectiveLetterSpacing != letterSpacing
72+ val isParentLetterSpacingDifferent =
73+ parentTextAttributes == null || parentTextAttributes.effectiveLetterSpacing != letterSpacing
5874
59- return if (! letterSpacing.isNaN() && isParentLetterSpacingDifferent) {
60- letterSpacing
61- } else {
62- Float .NaN
75+ return if (! letterSpacing.isNaN() && isParentLetterSpacingDifferent) {
76+ letterSpacing
77+ } else {
78+ Float .NaN
79+ }
6380 }
64- }
6581
66- override fun getEffectiveFontSize (): Int {
67- val fontSize = textAttributes.effectiveFontSize
82+ override val effectiveFontSize: Int
83+ get() {
84+ val fontSize = textAttributes.effectiveFontSize
6885
69- return if (parentTextAttributes == null || parentTextAttributes.effectiveFontSize != fontSize) {
70- fontSize
71- } else {
72- EffectiveTextAttributeProvider .UNSET
86+ return if (parentTextAttributes == null || parentTextAttributes.effectiveFontSize != fontSize) {
87+ fontSize
88+ } else {
89+ EffectiveTextAttributeProvider .UNSET
90+ }
7391 }
74- }
7592
76- override fun getEffectiveLineHeight (): Float {
77- val lineHeight = textAttributes.effectiveLineHeight
78- val isParentLineHeightDifferent =
79- parentTextAttributes == null || parentTextAttributes.effectiveLineHeight != lineHeight
80-
81- return if (! lineHeight.isNaN() && isParentLineHeightDifferent) {
82- lineHeight
83- } else {
84- Float .NaN
93+ override val effectiveLineHeight: Float
94+ get() {
95+ val lineHeight = textAttributes.effectiveLineHeight
96+ val isParentLineHeightDifferent =
97+ parentTextAttributes == null || parentTextAttributes.effectiveLineHeight != lineHeight
98+
99+ return if (! lineHeight.isNaN() && isParentLineHeightDifferent) {
100+ lineHeight
101+ } else {
102+ Float .NaN
103+ }
85104 }
86- }
87105}
0 commit comments