mirror of https://github.com/Nheko-Reborn/nheko
parent
b82c11bd79
commit
1961312b15
@ -1,56 +1,62 @@ |
||||
import QtQuick 2.13 |
||||
import QtQuick.Layouts 1.13 |
||||
import QtQuick.Controls 2.13 |
||||
import QtQuick.Layouts 1.13 |
||||
|
||||
TextField { |
||||
id: input |
||||
palette: colors |
||||
|
||||
background: Rectangle { |
||||
color: colors.base |
||||
} |
||||
palette: colors |
||||
|
||||
Rectangle { |
||||
id: blueBar |
||||
|
||||
anchors.top: parent.bottom |
||||
anchors.horizontalCenter: parent.horizontalCenter |
||||
|
||||
color: colors.highlight |
||||
height: 1 |
||||
width: parent.width |
||||
|
||||
|
||||
Rectangle { |
||||
id: blackBar |
||||
|
||||
anchors.verticalCenter: blueBar.verticalCenter |
||||
anchors.horizontalCenter: parent.horizontalCenter |
||||
|
||||
height: parent.height+1 |
||||
height: parent.height + 1 |
||||
width: 0 |
||||
color: colors.text |
||||
|
||||
|
||||
states: State { |
||||
name: "focused"; when: input.activeFocus == true |
||||
name: "focused" |
||||
when: input.activeFocus == true |
||||
|
||||
PropertyChanges { |
||||
target: blackBar |
||||
width: blueBar.width |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
transitions: Transition { |
||||
from: "" |
||||
to: "focused" |
||||
reversible: true |
||||
|
||||
NumberAnimation { |
||||
NumberAnimation { |
||||
target: blackBar |
||||
properties: "width" |
||||
duration: 500 |
||||
easing.type: Easing.InOutQuad |
||||
alwaysRunToEnd: true |
||||
alwaysRunToEnd: true |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
} |
||||
} |
||||
|
||||
background: Rectangle { |
||||
color: colors.base |
||||
} |
||||
|
||||
} |
||||
|
Loading…
Reference in new issue