feat(TextField): set border color when field is selected

This commit is contained in:
Ronan Abhamon 2018-07-24 13:54:44 +02:00
parent 33299e97b4
commit 3df5342ae5
2 changed files with 6 additions and 1 deletions

View file

@ -23,7 +23,11 @@ Controls.TextField {
border {
color: textField.error.length > 0
? TextFieldStyle.background.border.color.error
: TextFieldStyle.background.border.color.normal
: (
textField.activeFocus && !textField.readOnly
? TextFieldStyle.background.border.color.selected
: TextFieldStyle.background.border.color.normal
)
width: TextFieldStyle.background.border.width
}

View file

@ -17,6 +17,7 @@ QtObject {
property QtObject color: QtObject {
property color error: Colors.error
property color normal: Colors.c
property color selected: Colors.i
}
property int width: 1