This commit is contained in:
Aidan Hahn 2019-09-03 19:59:08 -07:00
parent 5326d29e56
commit 4a223ef508
No known key found for this signature in database
GPG key ID: 327711E983899316

View file

@ -19,8 +19,8 @@
#include <QDebug> #include <QDebug>
#include <QMouseEvent> #include <QMouseEvent>
#include <QPainter> #include <QPainter>
#include <QtGlobal>
#include <QSettings> #include <QSettings>
#include <QtGlobal>
#include "AvatarProvider.h" #include "AvatarProvider.h"
#include "Cache.h" #include "Cache.h"
@ -291,9 +291,8 @@ RoomInfoListItem::paintEvent(QPaintEvent *event)
p.setPen(Qt::NoPen); p.setPen(Qt::NoPen);
p.setBrush(brush); p.setBrush(brush);
rounded ? rounded ? p.drawEllipse(avatarRegion.center(), wm.iconSize / 2, wm.iconSize / 2)
p.drawEllipse(avatarRegion.center(), wm.iconSize / 2, wm.iconSize / 2) : : p.drawRoundedRect(avatarRegion, 3, 3);
p.drawRoundedRect(avatarRegion, 3, 3);
QFont bubbleFont; QFont bubbleFont;
bubbleFont.setPointSizeF(bubbleFont.pointSizeF() * 1.4); bubbleFont.setPointSizeF(bubbleFont.pointSizeF() * 1.4);
@ -306,9 +305,8 @@ RoomInfoListItem::paintEvent(QPaintEvent *event)
p.save(); p.save();
QPainterPath path; QPainterPath path;
rounded ? rounded ? path.addEllipse(wm.padding, wm.padding, wm.iconSize, wm.iconSize)
path.addEllipse(wm.padding, wm.padding, wm.iconSize, wm.iconSize) : : path.addRoundedRect(avatarRegion, 3, 3);
path.addRoundedRect(avatarRegion, 3, 3);
p.setClipPath(path); p.setClipPath(path);