NTP-43700 | Background color animation fix (#711)
This commit is contained in:
@@ -96,7 +96,7 @@ class AnimatedVisibilityRenderer(
|
||||
animatedProperties,
|
||||
)
|
||||
.setBackground(
|
||||
animatedProperties?.backgroundColor ?: property.backgroundColor,
|
||||
property.backgroundColor,
|
||||
property.shape,
|
||||
property.backGroundBrushData,
|
||||
animatedProperties,
|
||||
|
||||
@@ -134,7 +134,7 @@ class BoxRenderer(
|
||||
animatedProperties,
|
||||
)
|
||||
.setBackground(
|
||||
animatedProperties?.backgroundColor ?: property.backgroundColor,
|
||||
property.backgroundColor,
|
||||
property.shape,
|
||||
property.backGroundBrushData,
|
||||
animatedProperties,
|
||||
|
||||
@@ -193,7 +193,7 @@ class TextRenderer : Renderer<TextProperty> {
|
||||
animatedProperties,
|
||||
)
|
||||
.setBackground(
|
||||
animatedProperties?.backgroundColor ?: property.backgroundColor,
|
||||
property.backgroundColor,
|
||||
property.shape,
|
||||
property.backGroundBrushData,
|
||||
animatedProperties,
|
||||
|
||||
@@ -484,7 +484,7 @@ fun Modifier.clip(uiTronShape: UiTronShape?): Modifier = composed {
|
||||
}
|
||||
|
||||
fun Modifier.setBackground(
|
||||
backgroundColor: Any?,
|
||||
backgroundColor: String?,
|
||||
uiTronShape: UiTronShape?,
|
||||
brushData: BrushData?,
|
||||
animatedProperties: AnimatedProperties? = null,
|
||||
@@ -499,16 +499,12 @@ fun Modifier.setBackground(
|
||||
} else if (backgroundColor.isNotNull()) {
|
||||
this.background(
|
||||
color =
|
||||
when (backgroundColor) {
|
||||
is String -> backgroundColor.hexToComposeColor
|
||||
is Color -> animatedProperties?.backgroundColor?.value ?: backgroundColor
|
||||
else -> Color.Transparent
|
||||
},
|
||||
animatedProperties?.backgroundColor?.value
|
||||
?: backgroundColor?.hexToComposeColor
|
||||
?: Color.Transparent,
|
||||
shape = ShapeUtil.getShape(shape = uiTronShape),
|
||||
)
|
||||
} else {
|
||||
this
|
||||
}
|
||||
} else this
|
||||
}
|
||||
|
||||
fun getTileMode(tileMode: String?): TileMode {
|
||||
|
||||
Reference in New Issue
Block a user