Working notification.

Also, fixes #6.
This commit is contained in:
Black Hat
2018-08-19 14:32:18 +08:00
parent aa8f50a6c2
commit 4383dfa5a1
9 changed files with 45 additions and 51 deletions

View File

@@ -318,6 +318,9 @@ Item {
bottomPadding: 0
selectByMouse: true
text: currentRoom ? currentRoom.cachedInput : ""
onTextChanged: currentRoom.cachedInput = text
Keys.onReturnPressed: {
if (inputField.text) {
inputField.postMessage(inputField.text)

View File

@@ -30,13 +30,15 @@ Item {
id: searchField
width: parent.width - 18
height: 36
color: "black"
leftPadding: mini ? 4 : 16
color: "white"
leftPadding: mini ? 4 : 32
topPadding: 0
bottomPadding: 0
anchors.centerIn: parent
background: Row {
visible: !parent.text
MaterialIcon {
icon: "\ue8b6"
color: "white"
@@ -55,17 +57,6 @@ Item {
verticalAlignment: Text.AlignVCenter
}
}
Rectangle {
z: -2
width: searchField.activeFocus || searchField.text ? parent.width : 0
height: parent.height
color: "white"
Behavior on width {
PropertyAnimation { easing.type: Easing.InOutCubic; duration: 200 }
}
}
}
}