ran make lint to apply style guidelines

This commit is contained in:
Aidan Hahn 2019-09-02 23:30:59 -07:00
parent 3677c58a17
commit 69fbaf9ae6
No known key found for this signature in database
GPG key ID: 327711E983899316

View file

@ -101,7 +101,6 @@ Avatar::setIcon(const QIcon &icon)
void void
Avatar::paintEvent(QPaintEvent *) Avatar::paintEvent(QPaintEvent *)
{ {
bool rounded = QSettings().value("user/avatar/circles", true).toBool(); bool rounded = QSettings().value("user/avatar/circles", true).toBool();
QPainter painter(this); QPainter painter(this);
@ -117,9 +116,8 @@ Avatar::paintEvent(QPaintEvent *)
painter.setPen(Qt::NoPen); painter.setPen(Qt::NoPen);
painter.setBrush(brush); painter.setBrush(brush);
rounded ? rounded ? painter.drawEllipse(r.center(), hs, hs)
painter.drawEllipse(r.center(), hs, hs) : : painter.drawRoundedRect(r, 3, 3);
painter.drawRoundedRect(r, 3, 3);
} }
switch (type_) { switch (type_) {
@ -133,9 +131,8 @@ Avatar::paintEvent(QPaintEvent *)
case ui::AvatarType::Image: { case ui::AvatarType::Image: {
QPainterPath ppath; QPainterPath ppath;
rounded ? rounded ? ppath.addEllipse(width() / 2 - hs, height() / 2 - hs, size_, size_)
ppath.addEllipse(width() / 2 - hs, height() / 2 - hs, size_, size_) : : ppath.addRoundedRect(r, 3, 3);
ppath.addRoundedRect(r, 3, 3);
painter.setClipPath(ppath); painter.setClipPath(ppath);
painter.drawPixmap(QRect(width() / 2 - hs, height() / 2 - hs, size_, size_), painter.drawPixmap(QRect(width() / 2 - hs, height() / 2 - hs, size_, size_),