Update color of form and search bar

main
CAPEL Maxime 2023-12-08 14:23:23 +01:00
parent 9deec816e0
commit 899d48f01a
2 changed files with 23 additions and 8 deletions

View File

@ -143,6 +143,11 @@ fun glossaryDetailedPage(glossary: List<Word>, onBackClick: () -> Unit) {
leadingIcon = { leadingIcon = {
Icon(imageVector = Icons.Default.Search, contentDescription = null) Icon(imageVector = Icons.Default.Search, contentDescription = null)
}, },
colors = TextFieldDefaults.outlinedTextFieldColors(
focusedBorderColor = customRedColor,
cursorColor = customRedColor,
focusedLabelColor = customRedColor,
),
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(16.dp) .padding(16.dp)

View File

@ -5,7 +5,6 @@ import androidx.compose.material.*
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.Check import androidx.compose.material.icons.filled.Check
import androidx.compose.material.icons.filled.Close
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.MutableState import androidx.compose.runtime.MutableState
import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.mutableStateOf
@ -44,7 +43,7 @@ fun formPage(onCancelClick: () -> Unit) {
Text(text = "Confirmation d'ajout de mot") Text(text = "Confirmation d'ajout de mot")
}, },
text = { text = {
Text("Le mot a bien été ajouté au glossaire.") Text("Le mot '${name.value}' a bien été ajouté au glossaire.")
}, },
confirmButton = { confirmButton = {
Button( Button(
@ -77,6 +76,11 @@ fun formPage(onCancelClick: () -> Unit) {
value = name.value, value = name.value,
onValueChange = { name.value = it }, onValueChange = { name.value = it },
label = { Text("Mot *") }, label = { Text("Mot *") },
colors = TextFieldDefaults.textFieldColors(
focusedIndicatorColor = customRedColor,
unfocusedIndicatorColor = Color.Gray,
focusedLabelColor = customRedColor
)
) )
TextField( TextField(
@ -85,7 +89,8 @@ fun formPage(onCancelClick: () -> Unit) {
label = { Text("Description") }, label = { Text("Description") },
colors = TextFieldDefaults.textFieldColors( colors = TextFieldDefaults.textFieldColors(
focusedIndicatorColor = customRedColor, focusedIndicatorColor = customRedColor,
unfocusedIndicatorColor = Color.Gray unfocusedIndicatorColor = Color.Gray,
focusedLabelColor = customRedColor
) )
) )
@ -95,7 +100,8 @@ fun formPage(onCancelClick: () -> Unit) {
label = { Text("Contexte principal *") }, label = { Text("Contexte principal *") },
colors = TextFieldDefaults.textFieldColors( colors = TextFieldDefaults.textFieldColors(
focusedIndicatorColor = customRedColor, focusedIndicatorColor = customRedColor,
unfocusedIndicatorColor = Color.Gray unfocusedIndicatorColor = Color.Gray,
focusedLabelColor = customRedColor
) )
) )
@ -105,7 +111,8 @@ fun formPage(onCancelClick: () -> Unit) {
label = { Text("Contexte 2") }, label = { Text("Contexte 2") },
colors = TextFieldDefaults.textFieldColors( colors = TextFieldDefaults.textFieldColors(
focusedIndicatorColor = customRedColor, focusedIndicatorColor = customRedColor,
unfocusedIndicatorColor = Color.Gray unfocusedIndicatorColor = Color.Gray,
focusedLabelColor = customRedColor
) )
) )
@ -115,7 +122,8 @@ fun formPage(onCancelClick: () -> Unit) {
label = { Text("Lié à") }, label = { Text("Lié à") },
colors = TextFieldDefaults.textFieldColors( colors = TextFieldDefaults.textFieldColors(
focusedIndicatorColor = customRedColor, focusedIndicatorColor = customRedColor,
unfocusedIndicatorColor = Color.Gray unfocusedIndicatorColor = Color.Gray,
focusedLabelColor = customRedColor
) )
) )
@ -125,7 +133,8 @@ fun formPage(onCancelClick: () -> Unit) {
label = { Text("Synonyme") }, label = { Text("Synonyme") },
colors = TextFieldDefaults.textFieldColors( colors = TextFieldDefaults.textFieldColors(
focusedIndicatorColor = customRedColor, focusedIndicatorColor = customRedColor,
unfocusedIndicatorColor = Color.Gray unfocusedIndicatorColor = Color.Gray,
focusedLabelColor = customRedColor
) )
) )
@ -135,7 +144,8 @@ fun formPage(onCancelClick: () -> Unit) {
label = { Text("Antonyme") }, label = { Text("Antonyme") },
colors = TextFieldDefaults.textFieldColors( colors = TextFieldDefaults.textFieldColors(
focusedIndicatorColor = customRedColor, focusedIndicatorColor = customRedColor,
unfocusedIndicatorColor = Color.Gray unfocusedIndicatorColor = Color.Gray,
focusedLabelColor = customRedColor
) )
) )