diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt index f28950e..a6745bf 100644 --- a/src/main/kotlin/Main.kt +++ b/src/main/kotlin/Main.kt @@ -137,16 +137,24 @@ fun ChoixLangagePage( onJavaClick: () -> Unit, onJavaScriptClick: () -> Unit ) { + + Column( + modifier = Modifier.fillMaxSize(), + verticalArrangement = Arrangement.Top, // Align content at the top + horizontalAlignment = Alignment.CenterHorizontally + ) { + Text(text = "Choix du langage", style = MaterialTheme.typography.h3) + } + Column( modifier = Modifier .fillMaxSize() // Fills the maximum available width - .padding(16.dp), - verticalArrangement = Arrangement.spacedBy(8.dp), + .padding(50.dp), + // allign the content in the center vertically and horizontally + verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally ) { - Text(text = "Choix du langage", style = MaterialTheme.typography.h5) - Button(onClick = onPythonClick) { Text("Python") } @@ -158,7 +166,14 @@ fun ChoixLangagePage( Button(onClick = onJavaScriptClick) { Text("JavaScript") } + } + // Bouton retour positionné tout en bas et centré horizontalement + Column( + modifier = Modifier.fillMaxSize().padding(20.dp), + verticalArrangement = Arrangement.Bottom, + horizontalAlignment = Alignment.CenterHorizontally + ) { Button(onClick = onRetourClick) { Text("Retour") } @@ -173,15 +188,23 @@ fun glossairePage( onExporterClick: () -> Unit, onRetourClick: () -> Unit ) { + + Column( + modifier = Modifier.fillMaxSize(), + verticalArrangement = Arrangement.Top, // Align content at the top + horizontalAlignment = Alignment.CenterHorizontally + ) { + Text(text = "Glossaire", style = MaterialTheme.typography.h3) + } + Column( modifier = Modifier .fillMaxSize() // Fills the maximum available width .padding(16.dp), - verticalArrangement = Arrangement.spacedBy(8.dp), + verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally ) { - Text(text = "Glossaire", style = MaterialTheme.typography.h5) Button(onClick = onAjouterMotClick) { Text("Ajouter un mot") @@ -194,11 +217,18 @@ fun glossairePage( Button(onClick = onExporterClick) { Text("Exporter un fichier CSV") } - //Ajoute un bouton retour + + } + + // Bouton retour positionné tout en bas et centré horizontalement + Column( + modifier = Modifier.fillMaxSize().padding(20.dp), + verticalArrangement = Arrangement.Bottom, + horizontalAlignment = Alignment.CenterHorizontally + ) { Button(onClick = onRetourClick) { Text("Retour") } - } }