~phablet-team/messaging-app/select-part-of-message

« back to all changes in this revision

Viewing changes to src/qml/ThreadDelegate.qml

  • Committer: Tiago Salem Herrmann
  • Date: 2017-02-08 21:04:29 UTC
  • mfrom: (639.12.11 sort-thread)
  • Revision ID: tiago.herrmann@canonical.com-20170208210429-kk2s6v6jbxj8qnmr
merge parent

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
ListItem {
29
29
    id: delegate
30
30
 
 
31
    property bool compactView: false
31
32
    property var participant: participants ? participants[0] : {}
32
33
    property bool groupChat: chatType == HistoryThreadModel.ChatTypeRoom || participants.length > 1
33
34
    property string searchTerm
119
120
        }
120
121
        return formatDisplayedText(displayedEventTextMessage)
121
122
    }
 
123
 
 
124
    state: compactView ? "compactView" : ""
 
125
    states: [
 
126
        State {
 
127
            name: "compactView"
 
128
            PropertyChanges {
 
129
                target: avatar
 
130
                visible: false
 
131
                height:  0
 
132
                width: 0
 
133
            }
 
134
            PropertyChanges {
 
135
                target: delegate
 
136
                height: units.gu(5)
 
137
            }
 
138
            PropertyChanges {
 
139
                target: latestMessage
 
140
                visible: false
 
141
            }
 
142
            PropertyChanges {
 
143
                target: protocolIcon
 
144
                visible: false
 
145
            }
 
146
        }
 
147
    ]
122
148
    anchors.left: parent.left
123
149
    anchors.right: parent.right
124
 
    height: units.gu(10)
 
150
    height: units.gu(8)
125
151
    divider.visible: false
126
152
    contentItem.anchors {
127
153
        leftMargin: units.gu(2)
194
220
            if (isBroadcast) {
195
221
                return Qt.resolvedUrl("assets/broadcast_icon.png")
196
222
            } else if (groupChat) {
197
 
                return Qt.resolvedUrl("assets/group_icon.png")
 
223
                return "image://theme/contact-group" //Qt.resolvedUrl("assets/group_icon.png")
198
224
            }
199
 
            return ""
 
225
            return "image://theme/contact"
200
226
        }
201
227
        asynchronous: true
 
228
        sourceSize.height: units.gu(2)
202
229
    }
203
230
 
204
231
    Label {