mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-29 09:18:45 -04:00
Refactor qml structure for aesthetic contacts
This commit is contained in:
parent
59b77da6a2
commit
fa9578fca6
1 changed files with 97 additions and 77 deletions
|
@ -22,11 +22,20 @@ import QtQuick.Controls 2.0
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: delegateRoot
|
id: delegateRoot
|
||||||
height: 40
|
height: 50
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
color: contactItem.containsMouse ? "lightgrey" : "transparent"
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
|
||||||
|
|
||||||
MouseArea
|
MouseArea
|
||||||
{
|
{
|
||||||
|
id: contactItem
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
@ -45,6 +54,15 @@ Item
|
||||||
}
|
}
|
||||||
|
|
||||||
onPressAndHold: showDetails()
|
onPressAndHold: showDetails()
|
||||||
|
hoverEnabled: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: "transparent"
|
||||||
|
anchors.margins: 5
|
||||||
|
// anchors.leftMargin: 5
|
||||||
|
|
||||||
|
|
||||||
ColorHash
|
ColorHash
|
||||||
{
|
{
|
||||||
|
@ -114,6 +132,7 @@ Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function showDetails()
|
function showDetails()
|
||||||
{
|
{
|
||||||
|
@ -124,3 +143,4 @@ Item
|
||||||
{md: contactsListView.model.get(index)})
|
{md: contactsListView.model.get(index)})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue