Commit b729dfa3 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(mainWindow/conversation): display contact actions

parent a2efc6fa
......@@ -31,6 +31,7 @@
<file>imgs/led_do_not_disturb.svg</file>
<file>imgs/conference.svg</file>
<file>imgs/cam.svg</file>
<file>imgs/chat.svg</file>
<file>imgs/chat_attachment.svg</file>
<file>imgs/led_connected.svg</file>
<file>imgs/led_absent.svg</file>
......
......@@ -10,7 +10,6 @@ Window {
default property alias content: content.data // Required.
property alias buttons: buttons.data // Required.
property alias descriptionText: description.text // Optionnal.
property bool centeredButtons // Optionnal.
modality: Qt.WindowModal
......
import QtQuick 2.7
// ===================================================================
// Bar which can contains ActionButton.
// Bar which can contains ActionButtons.
// ===================================================================
Row {
......
......@@ -26,15 +26,14 @@ ColumnLayout {
TextField {
Layout.fillWidth: true
Layout.preferredHeight: parent.height
background: Rectangle {
color: '#EAEAEA'
implicitHeight: 30
}
placeholderText: qsTr('searchContactPlaceholder')
}
ExclusiveButtons {
Layout.preferredHeight: parent.height
texts: [
qsTr('selectAllContacts'),
qsTr('selectConnectedContacts')
......@@ -42,7 +41,6 @@ ColumnLayout {
}
LightButton {
Layout.preferredHeight: parent.height
text: qsTr('addContact')
}
}
......@@ -156,6 +154,13 @@ ColumnLayout {
id: contact
width: parent.width
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: contact.state = 'hover'
onExited: contact.state = ''
}
Item {
anchors.verticalCenter: parent.verticalCenter
height: 30
......@@ -199,24 +204,46 @@ ColumnLayout {
font.weight: Font.DemiBold
text: $username
verticalAlignment: Text.AlignVCenter
}
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: contact.state = 'hover'
onExited: contact.state = ''
// Actions.
Row {
Layout.fillHeight: true
id: actions
spacing: 50
visible: false
ActionBar {
iconSize: parent.height
ActionButton {
icon: 'cam'
}
ActionButton {
icon: 'call'
}
ActionButton {
icon: 'chat'
}
}
// Actions.
// TODO.
ActionButton {
iconSize: parent.height
icon: 'delete'
onClicked: console.log('toto')
}
}
}
}
states: State {
name: 'hover'
PropertyChanges { target: contact; color: '#D1D1D1' }
PropertyChanges { target: actions; visible: true }
}
}
}
......
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