Skip to content

Commit

Permalink
Use theme color
Browse files Browse the repository at this point in the history
  • Loading branch information
pipe01 committed Jun 7, 2023
1 parent 05fe738 commit 4ca1375
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/main/java/com/jerboa/ui/components/login/Login.kt
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ fun LoginForm(
}
}
}

MyTextField(
modifier = Modifier
.background(if (wasAutofilled) Color(0xFFFFFDE7) else Color.Transparent)
.background(if (wasAutofilled) MaterialTheme.colorScheme.surfaceVariant else Color.Transparent)
.onAutofill(AutofillType.Username, AutofillType.EmailAddress) {
username = it
wasAutofilled = true
Expand All @@ -173,7 +174,7 @@ fun LoginForm(
)
PasswordField(
modifier = Modifier
.background(if (wasAutofilled) Color(0xFFFFFDE7) else Color.Transparent)
.background(if (wasAutofilled) MaterialTheme.colorScheme.surfaceVariant else Color.Transparent)
.onAutofill(AutofillType.Password) {
password = it
wasAutofilled = true
Expand Down

0 comments on commit 4ca1375

Please sign in to comment.