mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Transition on when toggle search box
This commit is contained in:
parent
353b34fcab
commit
a9e4271c35
@ -162,7 +162,7 @@ Item
|
|||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: searchBox
|
id: searchBox
|
||||||
visible: contactsView.searching
|
// visible: contactsView.searching
|
||||||
|
|
||||||
height: searchText.height + 10
|
height: searchText.height + 10
|
||||||
width: parent.width * 0.9
|
width: parent.width * 0.9
|
||||||
@ -177,9 +177,10 @@ Item
|
|||||||
{
|
{
|
||||||
id: searchText
|
id: searchText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
placeholderText : "Search contacts..."
|
// placeholderText : "Search contacts..."
|
||||||
width: parent.width - 5
|
width: parent.width
|
||||||
anchors.leftMargin: 5
|
anchors.leftMargin: 5
|
||||||
|
height: 0
|
||||||
|
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
@ -193,6 +194,27 @@ Item
|
|||||||
contactsSortWorker.sendMessage(
|
contactsSortWorker.sendMessage(
|
||||||
{'action': 'searchContact', 'sexp': text})
|
{'action': 'searchContact', 'sexp': text})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
states:
|
||||||
|
[
|
||||||
|
State
|
||||||
|
{
|
||||||
|
when: contactsView.searching;
|
||||||
|
PropertyChanges { target: searchText; height: implicitHeight }
|
||||||
|
PropertyChanges { target: searchText; placeholderText : "Search contacts..." }
|
||||||
|
PropertyChanges { target: searchBox; height: searchText.height + 10 }
|
||||||
|
},
|
||||||
|
State
|
||||||
|
{
|
||||||
|
when: !contactsView.searching;
|
||||||
|
PropertyChanges { target: searchText; height: 0 }
|
||||||
|
PropertyChanges { target: searchBox; height: 0 }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
transitions: Transition
|
||||||
|
{
|
||||||
|
NumberAnimation { property: "height"; duration: 500; easing.type: Easing.InOutQuad}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
Text
|
||||||
|
Loading…
Reference in New Issue
Block a user