show add profile button
This commit is contained in:
parent
7a7be2777b
commit
d3e178474d
|
@ -17,6 +17,7 @@ Item {
|
|||
property bool isGroup
|
||||
property bool showStatus
|
||||
property bool highlight
|
||||
property bool button
|
||||
property real logscale: 4 * Math.log10(gcd.themeScale + 1)
|
||||
property int baseWidth: 48 * logscale
|
||||
|
||||
|
@ -30,7 +31,7 @@ Item {
|
|||
Rectangle {
|
||||
width: highlight ? baseWidth - 4 : baseWidth
|
||||
height: highlight ? baseWidth - 4 : baseWidth
|
||||
color: "#FFFFFF"
|
||||
color: button ? windowItem.cwtch_dark_color: "#FFFFFF"
|
||||
radius: width / 2
|
||||
anchors.centerIn:parent
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
|
|||
ContactPicture {
|
||||
id: imgProfile
|
||||
showStatus: type == "contact"
|
||||
button: type == "button"
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
@ -50,10 +50,12 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
|
||||
profilesModel.append({
|
||||
profilesModel.insert(profilesModel.count-1,
|
||||
{
|
||||
"_handle": handle,
|
||||
"_displayName": displayName,
|
||||
"_image": image
|
||||
"_image": image,
|
||||
"_type": "profile"
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -71,6 +73,13 @@ ColumnLayout {
|
|||
|
||||
ListModel { // Profile OBJECTS ARE STORED HERE ...
|
||||
id: profilesModel
|
||||
|
||||
ListElement {
|
||||
_handle: ""
|
||||
_displayName: qsTr("Add new profile")
|
||||
_image: "qrc:/qml/images/fontawesome/solid/user-plus.svg"
|
||||
_type: "button"
|
||||
}
|
||||
}
|
||||
|
||||
Repeater {
|
||||
|
@ -84,7 +93,7 @@ ColumnLayout {
|
|||
status: 0
|
||||
blocked: false
|
||||
loading: false
|
||||
type: "profile"
|
||||
type: _type
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue