mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix bugs from pull #2
This commit is contained in:
parent
4af09eebf6
commit
c7f22707f6
|
@ -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)
|
|||
|
||||
mainFootLayout->addWidget(msgEdit);
|
||||
mainFootLayout->addLayout(footButtonsSmall);
|
||||
mainFootLayout->addSpacing(5);
|
||||
mainFootLayout->addWidget(sendButton);
|
||||
mainFootLayout->setSpacing(0);
|
||||
|
||||
head->setLayout(headLayout);
|
||||
headLayout->addWidget(avatar);
|
||||
|
|
|
@ -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()
|
|||
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)
|
|||
|
||||
void Widget::onFriendWidgetClicked(FriendWidget *widget)
|
||||
{
|
||||
if (activeFriendWidget != 0)
|
||||
if (activeFriendWidget != nullptr)
|
||||
{
|
||||
activeFriendWidget->setAsInactiveFriend();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user