NTP-34175 | Fix for Image not aligning to the center of text (#692)
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
package com.navi.uitron.render
|
||||
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.text.BasicText
|
||||
import androidx.compose.foundation.text.ClickableText
|
||||
import androidx.compose.foundation.text.InlineTextContent
|
||||
@@ -14,6 +16,7 @@ import androidx.compose.foundation.text.appendInlineContent
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.alpha
|
||||
import androidx.compose.ui.graphics.Color
|
||||
@@ -163,13 +166,18 @@ class SpannableTextRenderer : Renderer<SpannableProperty> {
|
||||
PlaceholderVerticalAlign.TextCenter,
|
||||
)
|
||||
) {
|
||||
ImageRenderer()
|
||||
.Render(
|
||||
property = imageProperty ?: ImageProperty(),
|
||||
uiTronData = value,
|
||||
uiTronViewModel = uiTronViewModel,
|
||||
modifier = Modifier,
|
||||
)
|
||||
Box(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
ImageRenderer()
|
||||
.Render(
|
||||
property = imageProperty ?: ImageProperty(),
|
||||
uiTronData = value,
|
||||
uiTronViewModel = uiTronViewModel,
|
||||
modifier = Modifier,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
?.toMap()
|
||||
|
||||
Reference in New Issue
Block a user