Display a placeholder icon in profile-picture spot
Now we can display an icon, since profile pictures aren’t loaded (yet).
This commit is contained in:
parent
3cefb2fa75
commit
a60f5f0091
|
@ -126,6 +126,12 @@
|
|||
|
||||
;; Initialize the window.
|
||||
(define (init-window window)
|
||||
;; Set the profile-picture label to a default theme icon.
|
||||
(set! (qt:property (qt:find window "avatarLabel") "pixmap")
|
||||
(qt:icon->pixmap (or (qt:icon "person")
|
||||
(qt:icon "contact-new"))
|
||||
100 100))
|
||||
;; Now prepare callbacks and show the window.
|
||||
(window-callbacks window)
|
||||
(qt:show window))
|
||||
|
||||
|
|
28
contact.ui
28
contact.ui
|
@ -21,31 +21,13 @@
|
|||
<enum>QLayout::SetMinimumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGraphicsView" name="profilePicture">
|
||||
<property name="enabled">
|
||||
<widget class="QLabel" name="avatarLabel">
|
||||
<property name="text">
|
||||
<string>Profile picture</string>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
|
Ŝarĝante…
Reference in New Issue