From ce41ac682cee1eba4af8262cea7a4e4717a9e64d Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 8 Sep 2024 21:34:26 +0200 Subject: [PATCH] Fixed centering loading text --- .../net/codinux/banking/ui/screens/ExportScreen.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/ExportScreen.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/ExportScreen.kt index d22e33c..86f7f88 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/ExportScreen.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/ExportScreen.kt @@ -55,15 +55,19 @@ fun ExportScreen(onClosed: () -> Unit) { } } - Column(Modifier.fillMaxSize().verticalScroll(ScrollState(0), enabled = true).horizontalScroll(ScrollState(0), enabled = true)) { - if (isLoadingExportedData == false) { + if (isLoadingExportedData == false) { + Column(Modifier.verticalScroll(ScrollState(0), enabled = true).horizontalScroll(ScrollState(0), enabled = true)) { SelectionContainer { Text(exportedDataText, fontFamily = FontFamily.Monospace) } - } else { + } + } else { + Column(Modifier.fillMaxSize()) { Spacer(Modifier.weight(1f)) - Text("Daten werden geladen ...", Modifier.fillMaxWidth(), textAlign = TextAlign.Center) // centering text does not work, no matter what i tried + Row(Modifier.fillMaxWidth()) { + Text("Daten werden geladen ...", Modifier.fillMaxWidth(), textAlign = TextAlign.Center) + } Spacer(Modifier.weight(1f)) }