From 2e9b782aae44db2a60edfbd99bda064a88ed78d9 Mon Sep 17 00:00:00 2001 From: FielderNik <59266037+FielderNik@users.noreply.github.com> Date: Sun, 17 Sep 2023 12:22:21 +0300 Subject: [PATCH] [#2037] fixed username text (#2639) * [#2037] fixed username text * [#2037] fixed by detect --------- Co-authored-by: alexey_nik --- .../src/main/java/com/ivy/home/HomeHeader.kt | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/screen-home/src/main/java/com/ivy/home/HomeHeader.kt b/screen-home/src/main/java/com/ivy/home/HomeHeader.kt index 5d521466bc..55d0d9213c 100644 --- a/screen-home/src/main/java/com/ivy/home/HomeHeader.kt +++ b/screen-home/src/main/java/com/ivy/home/HomeHeader.kt @@ -6,6 +6,7 @@ import androidx.compose.animation.core.Spring import androidx.compose.animation.core.animateFloatAsState import androidx.compose.foundation.background import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -26,6 +27,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.testTag import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import com.ivy.core.data.db.entity.TransactionType import com.ivy.design.l0_system.UI @@ -128,12 +130,15 @@ private fun HeaderStickyRow( ) { Row( modifier = Modifier - .fillMaxWidth(), - verticalAlignment = Alignment.CenterVertically + .fillMaxWidth() + .padding(horizontal = 24.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.End, ) { - Spacer(Modifier.width(24.dp)) - - Box { + Box( + modifier = Modifier.weight(1f), + contentAlignment = Alignment.CenterStart, + ) { Text( modifier = Modifier .alpha(percentExpanded) @@ -149,7 +154,9 @@ private fun HeaderStickyRow( style = UI.typo.b1.style( fontWeight = FontWeight.ExtraBold, color = UI.colors.pureInverse - ) + ), + overflow = TextOverflow.Ellipsis, + maxLines = 1, ) // Balance mini row @@ -172,8 +179,6 @@ private fun HeaderStickyRow( } } - Spacer(Modifier.weight(1f)) - IvyOutlinedButton( modifier = Modifier.horizontalSwipeListener( sensitivity = 75, @@ -193,8 +198,6 @@ private fun HeaderStickyRow( Spacer(Modifier.width(12.dp)) Spacer(Modifier.width(40.dp)) // settings menu button spacer - - Spacer(Modifier.width(24.dp)) } }