diff --git a/src/RoomInfoListItem.cpp b/src/RoomInfoListItem.cpp
index 0ff4a00f..e2204ceb 100644
--- a/src/RoomInfoListItem.cpp
+++ b/src/RoomInfoListItem.cpp
@@ -20,6 +20,7 @@
#include <QMouseEvent>
#include <QPainter>
#include <QtGlobal>
+#include <QSettings>
#include "Cache.h"
#include "Config.h"
@@ -140,6 +141,8 @@ RoomInfoListItem::resizeEvent(QResizeEvent *)
void
RoomInfoListItem::paintEvent(QPaintEvent *event)
{
+ bool rounded = QSettings().value("user/avatar/circles", true).toBool();
+
Q_UNUSED(event);
QPainter p(this);
@@ -287,11 +290,9 @@ RoomInfoListItem::paintEvent(QPaintEvent *event)
p.setPen(Qt::NoPen);
p.setBrush(brush);
- rounded_ ?
+ rounded ?
p.drawEllipse(avatarRegion.center(), wm.iconSize / 2, wm.iconSize / 2) :
- p.drawRoundedRect( avatarRegion,
- AVATAR_RECT_ROUND,
- AVATAR_RECT_ROUND);
+ p.drawRoundedRect(avatarRegion, 3, 3);
QFont bubbleFont;
bubbleFont.setPointSizeF(bubbleFont.pointSizeF() * 1.4);
@@ -304,11 +305,9 @@ RoomInfoListItem::paintEvent(QPaintEvent *event)
p.save();
QPainterPath path;
- rounded_ ?
+ rounded ?
path.addEllipse(wm.padding, wm.padding, wm.iconSize, wm.iconSize) :
- path.addRoundedRect( avatarRegion,
- AVATAR_RECT_ROUND,
- AVATAR_RECT_ROUND);
+ path.addRoundedRect(avatarRegion, 3, 3);
p.setClipPath(path);
@@ -455,9 +454,3 @@ RoomInfoListItem::setDescriptionMessage(const DescInfo &info)
lastMsgInfo_ = info;
update();
}
-
-void
-RoomInfoListItem::setRounded(bool setting)
-{
- rounded_ = setting;
-}
|