mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-06 06:29:16 +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 currentTextColor = LocalContentColor.current
|
||||
|
||||
val textStyle = currentTextStyle.copy(
|
||||
lineHeight = 1.4.em,
|
||||
color = currentTextStyle.color.takeOrElse {
|
||||
LocalContentColor.current
|
||||
}
|
||||
)
|
||||
val textStyle = remember(currentTextStyle, currentTextColor) {
|
||||
currentTextStyle.copy(
|
||||
lineHeight = 1.4.em,
|
||||
color = currentTextStyle.color.takeOrElse {
|
||||
currentTextColor
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
MeasureSpaceWidth() { spaceWidth ->
|
||||
Column() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user