Better looking buttons

main
Cemal Odabasioglu 2023-11-07 15:48:14 +01:00
parent 76d7807c44
commit 3791cb99ef
1 changed files with 38 additions and 8 deletions

View File

@ -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")
}
}
}