fix(UserListPanel): minor cleanup
- fix margins - fix some warnings - drop dead/duplicate code
This commit is contained in:
parent
8603bb51e8
commit
0d43852394
|
@ -44,15 +44,14 @@ Item {
|
||||||
StatusListView {
|
StatusListView {
|
||||||
id: userListView
|
id: userListView
|
||||||
objectName: "userListPanel"
|
objectName: "userListPanel"
|
||||||
clip: true
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
|
||||||
policy: ScrollBar.AsNeeded
|
|
||||||
}
|
|
||||||
anchors {
|
anchors {
|
||||||
top: titleText.bottom
|
top: titleText.bottom
|
||||||
topMargin: Style.current.padding
|
topMargin: Style.current.padding
|
||||||
left: parent.left
|
left: parent.left
|
||||||
|
leftMargin: Style.current.halfPadding
|
||||||
right: parent.right
|
right: parent.right
|
||||||
|
rightMargin: Style.current.halfPadding
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
bottomMargin: Style.current.bigPadding
|
bottomMargin: Style.current.bigPadding
|
||||||
}
|
}
|
||||||
|
@ -73,10 +72,7 @@ Item {
|
||||||
section.property: "onlineStatus"
|
section.property: "onlineStatus"
|
||||||
section.delegate: (root.width > 58) ? sectionDelegateComponent : null
|
section.delegate: (root.width > 58) ? sectionDelegateComponent : null
|
||||||
delegate: StatusMemberListItem {
|
delegate: StatusMemberListItem {
|
||||||
anchors.left: parent.left
|
width: ListView.view.width
|
||||||
anchors.leftMargin: 8
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 8
|
|
||||||
nickName: model.localNickname
|
nickName: model.localNickname
|
||||||
userName: model.displayName
|
userName: model.displayName
|
||||||
pubKey: Utils.getCompressedPk(model.pubKey)
|
pubKey: Utils.getCompressedPk(model.pubKey)
|
||||||
|
@ -95,7 +91,7 @@ Item {
|
||||||
}
|
}
|
||||||
asset.isImage: (asset.name !== "")
|
asset.isImage: (asset.name !== "")
|
||||||
asset.isLetterIdenticon: (asset.name === "")
|
asset.isLetterIdenticon: (asset.name === "")
|
||||||
asset.color: Utils.colorForColorId(model.colorId)
|
asset.color: Utils.colorForColorId(model.colorId)
|
||||||
status: model.onlineStatus
|
status: model.onlineStatus
|
||||||
ringSettings.ringSpecModel: Utils.getColorHashAsJson(model.pubKey) // FIXME: use model.colorHash
|
ringSettings.ringSpecModel: Utils.getColorHashAsJson(model.pubKey) // FIXME: use model.colorHash
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -131,7 +127,7 @@ Item {
|
||||||
case Constants.onlineStatus.online:
|
case Constants.onlineStatus.online:
|
||||||
return qsTr("Online")
|
return qsTr("Online")
|
||||||
default:
|
default:
|
||||||
return qsTr("Inactive")
|
return qsTr("Inactive")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue