mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-02 11:26:31 -05:00
Set search button visibility only on contacts view
This commit is contained in:
parent
a8b26298d3
commit
d8eafaf9ea
@ -30,7 +30,13 @@ Item
|
|||||||
property bool searching: false
|
property bool searching: false
|
||||||
onSearchingChanged: !searching && contactsSortWorker.sendMessage({})
|
onSearchingChanged: !searching && contactsSortWorker.sendMessage({})
|
||||||
|
|
||||||
Component.onCompleted: refreshAll()
|
property string objectName:"contactsView"
|
||||||
|
|
||||||
|
Component.onCompleted:
|
||||||
|
{
|
||||||
|
toolBar.state = "CONTACTSVIEW"
|
||||||
|
refreshAll()
|
||||||
|
}
|
||||||
onFocusChanged: focus && refreshAll()
|
onFocusChanged: focus && refreshAll()
|
||||||
|
|
||||||
WorkerScript
|
WorkerScript
|
||||||
|
@ -74,6 +74,13 @@ ApplicationWindow
|
|||||||
State
|
State
|
||||||
{
|
{
|
||||||
name: "CHATVIEW"
|
name: "CHATVIEW"
|
||||||
|
},
|
||||||
|
State
|
||||||
|
{
|
||||||
|
name: "CONTACTSVIEW"
|
||||||
|
PropertyChanges { target: toolBar; titleText: defaultLabel}
|
||||||
|
PropertyChanges { target: toolBar; loaderSource: rsIcon}
|
||||||
|
PropertyChanges { target: searchIcon; searchIconVisibility: true}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -112,19 +119,20 @@ ApplicationWindow
|
|||||||
|
|
||||||
BtnIcon
|
BtnIcon
|
||||||
{
|
{
|
||||||
|
property bool searchIconVisibility: false
|
||||||
|
|
||||||
id: searchIcon
|
id: searchIcon
|
||||||
height: (coreReady)? parent.height - 10 : 0
|
height: (coreReady)? parent.height - 10 : 0
|
||||||
width: (coreReady)? parent.height - 10 : 0
|
width: (coreReady)? parent.height - 10 : 0
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
imgUrl: "qrc:/icons/search.svg"
|
imgUrl: "qrc:/icons/search.svg"
|
||||||
anchors.right: menu.left
|
anchors.right: menu.left
|
||||||
|
visible: searchIconVisibility && coreReady
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
stackView.push("qrc:/Contacts.qml",
|
stackView.push("qrc:/Contacts.qml",
|
||||||
{'searching': true} )
|
{'searching': true} )
|
||||||
}
|
}
|
||||||
|
|
||||||
visible: coreReady
|
|
||||||
}
|
}
|
||||||
MouseArea
|
MouseArea
|
||||||
{
|
{
|
||||||
@ -160,7 +168,9 @@ ApplicationWindow
|
|||||||
{
|
{
|
||||||
if (currentItem)
|
if (currentItem)
|
||||||
{
|
{
|
||||||
if (currentItem.objectName != "chatView" && toolBar.state != "DEFAULT")
|
if (currentItem.objectName != "chatView" &&
|
||||||
|
currentItem.objectName != "contactsView" &&
|
||||||
|
toolBar.state != "DEFAULT")
|
||||||
{
|
{
|
||||||
toolBar.state = "DEFAULT"
|
toolBar.state = "DEFAULT"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user