mirror of
https://github.com/pawelorzech/SunZones.git
synced 2026-01-29 19:54:26 +00:00
Fix location name text alignment for multi-line names
When a long location name like "Jabłonowo Pomorskie" wraps to two lines, the text was left-aligned instead of centered. Added textAlign = TextAlign.Center to the location name Text composable. https://claude.ai/code/session_01FAXwbjLiUKJdmsCyn3b9T8
This commit is contained in:
parent
d61cbd28a3
commit
36e958d828
1 changed files with 3 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ import androidx.compose.foundation.layout.offset
|
|||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.navigationBarsPadding
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.foundation.layout.statusBarsPadding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
|
|
@ -132,7 +133,8 @@ fun SunCard(
|
|||
text = location.name,
|
||||
style = MaterialTheme.typography.displayMedium.copy(shadow = TextShadowStrong),
|
||||
color = TextOnDark,
|
||||
maxLines = 2
|
||||
maxLines = 2,
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue