Browse Source

Fix bugs from pull #2

pull/3/head
Tux3 / Mlkj / !Lev.uXFMLA 11 years ago
parent
commit
c7f22707f6
  1. 6
      widget/form/chatform.cpp
  2. 6
      widget/widget.cpp

6
widget/form/chatform.cpp

@ -60,8 +60,8 @@ ChatForm::ChatForm(Friend* chatFriend) @@ -60,8 +60,8 @@ ChatForm::ChatForm(Friend* chatFriend)
callButton->setFlat(true);
callButton->setPalette(toxgreen);
callButton->setAutoFillBackground(true);
callButton->setIconSize(QSize(32,32));
callButton->setFixedSize(50,50);
callButton->setIconSize(QSize(25,25));
callButton->setFixedSize(50,40);
main->setLayout(mainLayout);
mainLayout->addWidget(chatArea);
@ -73,7 +73,9 @@ ChatForm::ChatForm(Friend* chatFriend) @@ -73,7 +73,9 @@ ChatForm::ChatForm(Friend* chatFriend)
mainFootLayout->addWidget(msgEdit);
mainFootLayout->addLayout(footButtonsSmall);
mainFootLayout->addSpacing(5);
mainFootLayout->addWidget(sendButton);
mainFootLayout->setSpacing(0);
head->setLayout(headLayout);
headLayout->addWidget(avatar);

6
widget/widget.cpp

@ -15,8 +15,7 @@ @@ -15,8 +15,7 @@
Widget *Widget::instance{nullptr};
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
QWidget(parent), ui(new Ui::Widget), activeFriendWidget{nullptr}
{
ui->setupUi(this);
ui->mainContent->setLayout(new QVBoxLayout());
@ -174,6 +173,7 @@ void Widget::hideMainForms() @@ -174,6 +173,7 @@ void Widget::hideMainForms()
item->widget()->hide();
while ((item = ui->mainContent->layout()->takeAt(0)) != 0)
item->widget()->hide();
activeFriendWidget->setAsInactiveFriend();
}
void Widget::onUsernameChanged(const QString& newUsername)
@ -296,7 +296,7 @@ void Widget::onFriendUsernameLoaded(int friendId, const QString& username) @@ -296,7 +296,7 @@ void Widget::onFriendUsernameLoaded(int friendId, const QString& username)
void Widget::onFriendWidgetClicked(FriendWidget *widget)
{
if (activeFriendWidget != 0)
if (activeFriendWidget != nullptr)
{
activeFriendWidget->setAsInactiveFriend();
}

Loading…
Cancel
Save