Compare commits

..

1 Enmetoj

Author SHA1 Message Date
Jaidyn Ann a1d2314b77 Parse and display contacts’ profile-photos 2024-02-11 18:49:41 -06:00
2 changed files with 3 additions and 14 deletions

View File

@ -230,20 +230,15 @@
(lineEditWidget (if formname (qt:find window lineEditName) #f))]
(cond
[lineEditWidget
(set! (qt:property lineEditWidget "text")
(cond
[(string? (last property))
(last property)]
[(uri:uri? (last property))
(uri:uri->string (last property))]
[#t ""]))]
(set! (qt:property lineEditWidget "text") (last property))]
[(and (eq? (car property) 'PHOTO)
(list? (last property)))
(let* [(avatar (qt:find window "avatarLabel"))
(old-pixmap (if avatar (qt:property avatar "pixmap")))
[new-pixmap (if avatar (u8vector->pixmap (cadr (last property))))]]
(when avatar
(set! (qt:property avatar "pixmap") new-pixmap)))])))
(set! (qt:property avatar "pixmap") new-pixmap)
(qt:delete old-pixmap)))])))
vcard-alist))

View File

@ -22,12 +22,6 @@
</property>
<item>
<widget class="QLabel" name="avatarLabel">
<property name="maximumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="text">
<string>Profile picture</string>
</property>