mirror of https://github.com/Nheko-Reborn/nheko
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.2 KiB
51 lines
1.2 KiB
4 years ago
|
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
|
||
|
|
||
|
color: "blue"
|
||
|
height: 1
|
||
|
width: parent.width
|
||
|
|
||
|
Rectangle {
|
||
|
id: blackBar
|
||
|
|
||
|
anchors.verticalCenter: blueBar.verticalCenter
|
||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||
|
|
||
|
height: parent.height+1
|
||
|
width: 0
|
||
|
color: "#000000"
|
||
|
|
||
|
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
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|