1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
agilob 2015-01-06 14:36:03 +00:00
parent a0bf23f3ff
commit cbfe94d6a2
No known key found for this signature in database
GPG Key ID: 34568050DBCCB997

View File

@ -57,7 +57,10 @@ GenericChatForm::GenericChatForm(QWidget *parent) :
QVBoxLayout *mainLayout = new QVBoxLayout(),
*footButtonsSmall = new QVBoxLayout(),
*volMicLayout = new QVBoxLayout();
*micButtonsLayout = new QVBoxLayout();
QGridLayout *buttonsLayout = new QGridLayout();
headTextLayout = new QVBoxLayout();
chatWidget = new ChatAreaWidget();
@ -123,23 +126,25 @@ GenericChatForm::GenericChatForm(QWidget *parent) :
mainFootLayout->addWidget(sendButton);
mainFootLayout->setSpacing(0);
headTextLayout->addStretch();
headTextLayout->addStretch();
headTextLayout->addWidget(nameLabel);
headTextLayout->addStretch();
micButtonsLayout->addWidget(micButton, Qt::AlignTop | Qt::AlignRight);
micButtonsLayout->addWidget(volButton, Qt::AlignTop | Qt::AlignRight);
buttonsLayout->addLayout(micButtonsLayout, 0, 0, Qt::AlignTop | Qt::AlignRight);
buttonsLayout->addWidget(callButton, 0, 1, 2, 1, Qt::AlignTop);
buttonsLayout->addWidget(videoButton, 0, 2, 2, 1, Qt::AlignTop);
buttonsLayout->setSpacing(1);
volMicLayout->addWidget(micButton, Qt::AlignTop);
volMicLayout->addSpacing(2);
volMicLayout->addWidget(volButton, Qt::AlignBottom);
headLayout->addWidget(avatar, Qt::AlignTop | Qt::AlignLeft);
headLayout->addSpacing(5);
headLayout->addLayout(headTextLayout, Qt::AlignTop | Qt::AlignAbsolute);
headLayout->addLayout(buttonsLayout, Qt::AlignTop | Qt::AlignRight);
headWidget->setLayout(headLayout);
headLayout->addWidget(avatar);
headLayout->addSpacing(5);
headLayout->addLayout(headTextLayout);
headLayout->addLayout(volMicLayout);
headLayout->addWidget(callButton);
headLayout->addSpacing(3);
headLayout->addWidget(videoButton);
headLayout->setSpacing(0);
//Fix for incorrect layouts on OS X as per
//https://bugreports.qt-project.org/browse/QTBUG-14591
sendButton->setAttribute(Qt::WA_LayoutUsesWidgetRect);