Commit 623a8bad authored by Ronan Abhamon's avatar Ronan Abhamon

feat(MainWindow/Contacts): use a `Loader` to display action buttons

parent af0c3d19
...@@ -102,6 +102,8 @@ ColumnLayout { ...@@ -102,6 +102,8 @@ ColumnLayout {
height: ContactsStyle.contact.height height: ContactsStyle.contact.height
width: parent.width width: parent.width
// -----------------------------------------------------------
Rectangle { Rectangle {
id: contact id: contact
...@@ -149,14 +151,22 @@ ColumnLayout { ...@@ -149,14 +151,22 @@ ColumnLayout {
} }
// Container. // Container.
Item { Loader {
id: loader
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
sourceComponent: container1
}
}
}
RowLayout { // ---------------------------------------------------------
Component {
id: container1 id: container1
anchors.fill: parent RowLayout {
spacing: ContactsStyle.contact.spacing spacing: ContactsStyle.contact.spacing
PresenceLevel { PresenceLevel {
...@@ -170,13 +180,12 @@ ColumnLayout { ...@@ -170,13 +180,12 @@ ColumnLayout {
status: $contact.presenceStatus status: $contact.presenceStatus
} }
} }
}
Item { Component {
id: container2 id: container2
anchors.fill: parent Item {
visible: false
ActionBar { ActionBar {
anchors { anchors {
left: parent.left left: parent.left
...@@ -212,8 +221,6 @@ ColumnLayout { ...@@ -212,8 +221,6 @@ ColumnLayout {
} }
} }
} }
}
}
// --------------------------------------------------------- // ---------------------------------------------------------
...@@ -230,8 +237,10 @@ ColumnLayout { ...@@ -230,8 +237,10 @@ ColumnLayout {
target: indicator target: indicator
} }
PropertyChanges { target: container1; visible: false } PropertyChanges {
PropertyChanges { target: container2; visible: true } sourceComponent: container2
target: loader
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment