Commit b729dfa3 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(mainWindow/conversation): display contact actions

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