From 98548b1b8bc7abae0757ffbc438922b5392e0616 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sun, 22 Jul 2018 20:01:12 +0300 Subject: [PATCH] Minor modal adjustments --- src/dialogs/MemberList.cpp | 10 +++------- src/dialogs/ReadReceipts.cpp | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/dialogs/MemberList.cpp b/src/dialogs/MemberList.cpp index 9757b8af..5995d40b 100644 --- a/src/dialogs/MemberList.cpp +++ b/src/dialogs/MemberList.cpp @@ -26,7 +26,7 @@ MemberItem::MemberItem(const RoomMember &member, QWidget *parent) textLayout_->setSpacing(0); avatar_ = new Avatar(this); - avatar_->setSize(46); + avatar_->setSize(44); avatar_->setLetter(utils::firstChar(member.display_name)); if (!member.avatar.isNull()) @@ -38,7 +38,6 @@ MemberItem::MemberItem(const RoomMember &member, QWidget *parent) [this](const QImage &img) { avatar_->setImage(img); }); QFont nameFont; - nameFont.setWeight(65); nameFont.setPointSizeF(nameFont.pointSizeF() * 1.1); userId_ = new QLabel(member.user_id, this); @@ -56,10 +55,7 @@ MemberList::MemberList(const QString &room_id, QWidget *parent) : QFrame(parent) , room_id_{room_id} { - QFont doubleFont; - doubleFont.setPointSizeF(doubleFont.pointSizeF() * 2); - setMinimumWidth(QFontMetrics(doubleFont).averageCharWidth() * 30); - setMinimumHeight(conf::modals::MIN_WIDGET_HEIGHT); + setMinimumSize(conf::modals::MIN_WIDGET_WIDTH, conf::modals::MIN_WIDGET_HEIGHT); setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); setAttribute(Qt::WA_DeleteOnClose, true); @@ -75,7 +71,7 @@ MemberList::MemberList(const QString &room_id, QWidget *parent) list_->setSpacing(5); QFont font; - font.setPointSizeF(font.pointSizeF() * conf::modals::LABEL_BIG_SIZE_RATIO); + font.setPointSizeF(font.pointSizeF() * conf::modals::LABEL_MEDIUM_SIZE_RATIO); topLabel_ = new QLabel(tr("Room members"), this); topLabel_->setAlignment(Qt::AlignCenter); diff --git a/src/dialogs/ReadReceipts.cpp b/src/dialogs/ReadReceipts.cpp index f3201de5..b0c18bba 100644 --- a/src/dialogs/ReadReceipts.cpp +++ b/src/dialogs/ReadReceipts.cpp @@ -31,7 +31,6 @@ ReceiptItem::ReceiptItem(QWidget *parent, textLayout_->setSpacing(conf::modals::TEXT_SPACING); QFont nameFont; - nameFont.setWeight(65); nameFont.setPointSizeF(nameFont.pointSizeF() * 1.1); auto displayName = Cache::displayName(room_id, user_id);