mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-07 19:49:17 +02:00
Avoids recompositions
This commit is contained in:
parent
903384d02a
commit
dd1ade2f99
@ -149,13 +149,16 @@ private fun RenderRegular(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val currentTextStyle = LocalTextStyle.current
|
val currentTextStyle = LocalTextStyle.current
|
||||||
|
val currentTextColor = LocalContentColor.current
|
||||||
|
|
||||||
val textStyle = currentTextStyle.copy(
|
val textStyle = remember(currentTextStyle, currentTextColor) {
|
||||||
lineHeight = 1.4.em,
|
currentTextStyle.copy(
|
||||||
color = currentTextStyle.color.takeOrElse {
|
lineHeight = 1.4.em,
|
||||||
LocalContentColor.current
|
color = currentTextStyle.color.takeOrElse {
|
||||||
}
|
currentTextColor
|
||||||
)
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
MeasureSpaceWidth() { spaceWidth ->
|
MeasureSpaceWidth() { spaceWidth ->
|
||||||
Column() {
|
Column() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user