Browse Source

set default avatar to contact_dark.png, removed active/inactive avatar

switching
pull/321/head
krepa098 11 years ago
parent
commit
76e5876f0a
  1. 7
      widget/friendwidget.cpp

7
widget/friendwidget.cpp

@ -45,7 +45,7 @@ FriendWidget::FriendWidget(int FriendId, QString id)
setLayoutDirection(Qt::LeftToRight); // parent might have set Qt::RightToLeft setLayoutDirection(Qt::LeftToRight); // parent might have set Qt::RightToLeft
avatar = new MaskablePixmapWidget(this, QSize(40,40), ":/img/avatar_mask.png"); avatar = new MaskablePixmapWidget(this, QSize(40,40), ":/img/avatar_mask.png");
avatar->setPixmap(QPixmap(":img/contact.png")); avatar->setPixmap(QPixmap(":img/contact_dark.png"));
name.setText(id); name.setText(id);
//statusPic.setAlignment(Qt::AlignHCenter); //statusPic.setAlignment(Qt::AlignHCenter);
statusPic.setPixmap(QPixmap(":img/status/dot_away.png")); statusPic.setPixmap(QPixmap(":img/status/dot_away.png"));
@ -140,8 +140,6 @@ void FriendWidget::setAsActiveChatroom()
QPalette pal3; QPalette pal3;
pal3.setColor(QPalette::Background, Qt::white); pal3.setColor(QPalette::Background, Qt::white);
this->setPalette(pal3); this->setPalette(pal3);
if (isDefaultAvatar)
avatar->setPixmap(QPixmap(":img/contact_dark.png"));
} }
void FriendWidget::setAsInactiveChatroom() void FriendWidget::setAsInactiveChatroom()
@ -160,9 +158,6 @@ void FriendWidget::setAsInactiveChatroom()
QPalette pal3; QPalette pal3;
pal3.setColor(QPalette::Background, QColor(65,65,65,255)); pal3.setColor(QPalette::Background, QColor(65,65,65,255));
this->setPalette(pal3); this->setPalette(pal3);
if (isDefaultAvatar)
avatar->setPixmap(QPixmap(":img/contact.png"));
} }
void FriendWidget::updateStatusLight() void FriendWidget::updateStatusLight()

Loading…
Cancel
Save