2021-02-23 19:06:21 +03:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
|
|
|
|
TextInput {
|
|
|
|
id: input
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: blueBar
|
|
|
|
|
|
|
|
anchors.top: parent.bottom
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
2021-02-23 19:37:45 +03:00
|
|
|
color: colors.highlight
|
2021-02-23 19:06:21 +03:00
|
|
|
height: 1
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: blackBar
|
|
|
|
|
|
|
|
anchors.verticalCenter: blueBar.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
|
|
height: parent.height+1
|
|
|
|
width: 0
|
2021-02-23 19:37:45 +03:00
|
|
|
color: colors.text
|
2021-02-23 19:06:21 +03:00
|
|
|
|
|
|
|
states: State {
|
|
|
|
name: "focused"; when: input.activeFocus == true
|
|
|
|
PropertyChanges {
|
|
|
|
target: blackBar
|
|
|
|
width: blueBar.width
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
transitions: Transition {
|
|
|
|
from: ""
|
|
|
|
to: "focused"
|
|
|
|
reversible: true
|
|
|
|
|
|
|
|
NumberAnimation {
|
|
|
|
target: blackBar
|
|
|
|
properties: "width"
|
|
|
|
duration: 500
|
|
|
|
easing.type: Easing.InOutQuad
|
|
|
|
alwaysRunToEnd: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|