Add User Feedback when hovering over a contact in groups

This commit is contained in:
Sarah Jamie Lewis 2019-03-06 13:18:00 -08:00
parent ac6fb8d2e8
commit bcd81c813d
3 changed files with 58 additions and 36 deletions

View File

@ -13,6 +13,7 @@ ColumnLayout {
id: overlay
property string name
property bool accepted
property bool inGroup
StackToolbar {
@ -143,12 +144,14 @@ ColumnLayout {
onResetMessagePane: function() {
overlayStack.overlay = overlayStack.chatOverlay
overlay.inGroup = false
}
onSupplyGroupSettings: function(gid, name, server, invite, accepted, addrbooknames, addrbookaddrs) {
console.log("Supplied " + gid + " " + name + "Accepted " + accepted)
overlay.name = name
overlay.accepted = accepted
overlay.inGroup = true
}
}
}

View File

@ -16,13 +16,21 @@ Item {
property int status
property bool isGroup
property bool showStatus
property bool highlight
Rectangle {
id: mainImage
width: 48
height: 48
color: highlight ? windowItem.cwtch_dark_color: "#FFFFFF"
radius: width / 2
Rectangle {
width: highlight ? 44 : 48
height: highlight ? 44 : 48
color: "#FFFFFF"
radius: width / 2
anchors.centerIn:parent
Image { // PROFILE IMAGE
@ -45,6 +53,8 @@ Item {
maskSource: mask
}
}
Rectangle { // PRESENCE INDICATOR
visible: showStatus
color: "#FFFFFF"
@ -66,5 +76,6 @@ Item {
anchors.margins: 1.5
}
}
}
}

View File

@ -48,9 +48,17 @@ RowLayout {
handle: root.from
visible: !fromMe
showStatus: false
highlight: ima.containsMouse
ToolTip.visible: ima.containsMouse
ToolTip.text: qsTr("Click to DM")
MouseArea {
id: ima
anchors.fill: parent
hoverEnabled: overlay.inGroup
onClicked: {
gcd.broadcast("ResetMessagePane")
theStack.pane = theStack.messagePane