From a60f5f009173f6fb15504b345f4777a8c404f27b Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Sun, 11 Feb 2024 11:52:20 -0600 Subject: [PATCH] Display a placeholder icon in profile-picture spot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now we can display an icon, since profile pictures aren’t loaded (yet). --- contact.scm | 6 ++++++ contact.ui | 28 +++++----------------------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/contact.scm b/contact.scm index 418bdf3..860dc97 100644 --- a/contact.scm +++ b/contact.scm @@ -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)) 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 -