Toolbar return to contacts view when click to icon or label

This commit is contained in:
Angela Mazzurco 2017-06-23 16:33:16 +02:00
parent b4ee63ad9b
commit c94672118e
2 changed files with 22 additions and 4 deletions

View File

@ -8,9 +8,10 @@ Item {
signal released
property var imgUrl: ""
property alias fillMode: image.fillMode
Image {
id: image
anchors.fill: parent
source: imgUrl

View File

@ -65,6 +65,15 @@ ApplicationWindow
property var searchBtnCb
function openMainPage ()
{
if (stackView.currentItem.objectName != "contactsView" )
{
stackView.push("qrc:/Contacts.qml")
}
}
states:
[
State
@ -103,10 +112,13 @@ ApplicationWindow
Component
{
id: rsIcon
Image
BtnIcon
{
height: imageLoader.height
width: imageLoader.height
fillMode: Image.PreserveAspectFit
source: "icons/retroshare06.png"
imgUrl: "/icons/retroshare06.png"
onClicked:{ toolBar.openMainPage() }
}
}
@ -116,8 +128,13 @@ ApplicationWindow
anchors.verticalCenter: parent.verticalCenter
anchors.left: imageLoader.right
anchors.leftMargin: 20
}
MouseArea {
anchors.fill: parent
onClicked: { toolBar.openMainPage() }
}
}
BtnIcon
{