Browse Source

Fix missing groupchat icon, clean up some code

pull/57/head
Kevin Flynn 11 years ago
parent
commit
6f30308a2c
  1. 6
      widget/friendwidget.cpp
  2. 4
      widget/groupwidget.cpp

6
widget/friendwidget.cpp

@ -11,16 +11,12 @@ FriendWidget::FriendWidget(int FriendId, QString id)
{ {
this->setMouseTracking(true); this->setMouseTracking(true);
this->setAutoFillBackground(true); this->setAutoFillBackground(true);
//this->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
//this->setMinimumWidth(225);
this->setFixedWidth(225); this->setFixedWidth(225);
this->setFixedHeight(55); this->setFixedHeight(55);
this->setLayout(&layout); this->setLayout(&layout);
//layout.setSpacing(0); layout.setSpacing(0);
layout.setMargin(0); layout.setMargin(0);
layout.setStretchFactor(this, 100); layout.setStretchFactor(this, 100);
//this->setFixedWidth(225);
//this->setMaximumWidth();
textLayout.setSpacing(0); textLayout.setSpacing(0);
textLayout.setMargin(0); textLayout.setMargin(0);

4
widget/groupwidget.cpp

@ -149,7 +149,7 @@ void GroupWidget::setAsActiveChatroom()
QPalette pal3; QPalette pal3;
pal3.setColor(QPalette::Background, Qt::white); pal3.setColor(QPalette::Background, Qt::white);
this->setPalette(pal3); this->setPalette(pal3);
avatar.setPixmap(QPixmap(":img/group.png")); avatar.setPixmap(QPixmap(":img/group_dark.png"));
} }
void GroupWidget::setAsInactiveChatroom() void GroupWidget::setAsInactiveChatroom()
@ -168,5 +168,5 @@ void GroupWidget::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);
avatar.setPixmap(QPixmap("img/group.png")); avatar.setPixmap(QPixmap(":img/group.png"));
} }

Loading…
Cancel
Save