mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
ran make lint to apply style guidelines
This commit is contained in:
parent
3677c58a17
commit
69fbaf9ae6
1 changed files with 4 additions and 7 deletions
|
@ -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_),
|
||||||
|
|
Loading…
Reference in a new issue