mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Style search box
This commit is contained in:
parent
aaeb29a146
commit
0742a44f73
@ -149,16 +149,20 @@ Item
|
|||||||
id: searchBox
|
id: searchBox
|
||||||
visible: contactsView.searching
|
visible: contactsView.searching
|
||||||
|
|
||||||
height: searchText.height
|
height: searchText.height + 10
|
||||||
width: searchText.width
|
width: parent.width * 0.9
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
anchors.leftMargin: 5
|
||||||
|
anchors.rightMargin: 5
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
color: "white"
|
||||||
|
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
id: searchIcon
|
id: searchIcon
|
||||||
height: searchText.height - 4
|
height: searchText.height / 2
|
||||||
width: searchText.height - 4
|
width: searchText.height / 2
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
source: "qrc:/icons/edit-find.png"
|
source: "qrc:/icons/edit-find.png"
|
||||||
}
|
}
|
||||||
@ -168,6 +172,15 @@ Item
|
|||||||
id: searchText
|
id: searchText
|
||||||
anchors.left: searchIcon.right
|
anchors.left: searchIcon.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
placeholderText : "Search contacts..."
|
||||||
|
width: parent.width - searchIcon.width - 5
|
||||||
|
anchors.leftMargin: 5
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
border.width: 2
|
||||||
|
radius: 5
|
||||||
|
border.color: searchText.focus ? "cornflowerblue" : "lightgrey"
|
||||||
|
}
|
||||||
onTextChanged:
|
onTextChanged:
|
||||||
contactsSortWorker.sendMessage(
|
contactsSortWorker.sendMessage(
|
||||||
{'action': 'searchContact', 'sexp': text})
|
{'action': 'searchContact', 'sexp': text})
|
||||||
|
Loading…
Reference in New Issue
Block a user