summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-27 22:17:23 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-27 22:17:42 +0200
commitbec562e845449c89ebd946f663048302dad90e69 (patch)
tree775f765edfac76cc65eed700e2e11bce2a699895
parente3a4d869cf0cc12a61f2b4faee44ab1d9751cca8 (diff)
downloadkube-bec562e845449c89ebd946f663048302dad90e69.tar.gz
kube-bec562e845449c89ebd946f663048302dad90e69.zip
Conditionally show the image
-rw-r--r--framework/qml/Icons.qml1
-rw-r--r--framework/qml/People.qml31
2 files changed, 26 insertions, 6 deletions
diff --git a/framework/qml/Icons.qml b/framework/qml/Icons.qml
index 0769ee13..bacaadfa 100644
--- a/framework/qml/Icons.qml
+++ b/framework/qml/Icons.qml
@@ -44,6 +44,7 @@ Item {
44 property string outbox_inverted: "mail-folder-outbox-inverted" 44 property string outbox_inverted: "mail-folder-outbox-inverted"
45 45
46 property string menu_inverted: "application-menu-inverted" 46 property string menu_inverted: "application-menu-inverted"
47 property string user: "im-user"
47 property string user_inverted: "im-user-inverted" 48 property string user_inverted: "im-user-inverted"
48 property string search_inverted: "edit-find-inverted" 49 property string search_inverted: "edit-find-inverted"
49 property string mail_inverted: "mail-message-inverted" 50 property string mail_inverted: "mail-message-inverted"
diff --git a/framework/qml/People.qml b/framework/qml/People.qml
index 3445a5ba..f67d55f1 100644
--- a/framework/qml/People.qml
+++ b/framework/qml/People.qml
@@ -149,15 +149,25 @@ Item {
149 } 149 }
150 } 150 }
151 151
152 Kube.KubeImage { 152 Rectangle {
153 id: avatarPlaceholder 153 id: avatarPlaceholder
154 154
155 height: parent.height 155 height: parent.height
156 width: height 156 width: height
157 157 Kube.KubeImage {
158 imageData: model.imageData 158 anchors.fill: parent
159 visible: model.imageData != ""
160 imageData: model.imageData
161 }
162 Kube.Icon {
163 anchors.fill: parent
164 visible: model.imageData == ""
165 iconName: Kube.Icons.user
166 }
167 color: "lightgrey"
159 } 168 }
160 169
170
161 Column { 171 Column {
162 172
163 width: parent.width 173 width: parent.width
@@ -241,13 +251,22 @@ Item {
241 height: Kube.Units.gridUnit * 8 251 height: Kube.Units.gridUnit * 8
242 width: personPageRoot.width - Kube.Units.largeSpacing 252 width: personPageRoot.width - Kube.Units.largeSpacing
243 253
244 Kube.KubeImage { 254 Rectangle {
245 id: avatar 255 id: avatar
246 256
247 height: parent.height 257 height: parent.height
248 width: height 258 width: height
249 259 Kube.KubeImage {
250 imageData: contactController.imageData 260 anchors.fill: parent
261 visible: contactController.imageData != ""
262 imageData: contactController.imageData
263 }
264 Kube.Icon {
265 anchors.fill: parent
266 visible: contactController.imageData == ""
267 iconName: Kube.Icons.user
268 }
269 color: "lightgrey"
251 } 270 }
252 271
253 //TODO replace with Kube.Heading once it is there 272 //TODO replace with Kube.Heading once it is there