diff --git a/contact.scm b/contact.scm index 418bdf3..83c8e87 100644 --- a/contact.scm +++ b/contact.scm @@ -126,6 +126,13 @@ ;; Initialize the window. (define (init-window window) + ;; Set the profile-picture label to a default theme icon. + (let [(default-profile-pic + (or (qt:theme-icon "person") (qt:theme-icon "contact-new")))] + (if default-profile-pic + (set! (qt:property (qt:find window "avatarLabel") "pixmap") + (qt:icon->pixmap default-profile-pic 100 100)))) + ;; Now prepare callbacks and show the window. (window-callbacks window) (qt:show window)) @@ -176,7 +183,8 @@ menu-file-open "triggered()" (qt:receiver (lambda () - (let* [(contacts-dir (conc (get-environment-variable "HOME") "/Contacts")) + (let* [(contacts-dir (conc (get-environment-variable "HOME") + "/Contacts")) (selected-file (qt:get-open-filename "Select a contact file to open…" contacts-dir)) @@ -187,7 +195,6 @@ program-args))))))))) - ;; Parse a vCard file and populate the window’s forms with its contents. (define (open-vcard-file window file) (if (and (file-exists? file) diff --git a/contact.ui b/contact.ui index 9f6f3d8..702c94f 100644 --- a/contact.ui +++ b/contact.ui @@ -21,31 +21,13 @@ QLayout::SetMinimumSize - - + + + Profile picture + + true - - - 0 - 0 - - - - - 50 - 50 - - - - - 100 - 100 - - - - QFrame::NoFrame -