mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #268 from krepa098/master
Various UI changes, fix #255
This commit is contained in:
commit
188f0f78f7
|
@ -19,6 +19,7 @@ div.message {
|
|||
div.date {
|
||||
color: #000000;
|
||||
padding-left: 3px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.quote {
|
||||
|
|
|
@ -29,7 +29,7 @@ ChatForm::ChatForm(Friend* chatFriend)
|
|||
nameLabel->setText(f->getName());
|
||||
avatarLabel->setPixmap(QPixmap(":/img/contact_dark.png"));
|
||||
|
||||
statusMessageLabel = new QLabel();
|
||||
statusMessageLabel = new CroppingLabel();
|
||||
netcam = new NetCamView();
|
||||
|
||||
headTextLayout->addWidget(statusMessageLabel);
|
||||
|
|
|
@ -68,7 +68,7 @@ private slots:
|
|||
|
||||
private:
|
||||
Friend* f;
|
||||
QLabel *statusMessageLabel;
|
||||
CroppingLabel *statusMessageLabel;
|
||||
NetCamView* netcam;
|
||||
bool audioInputFlag;
|
||||
int callId;
|
||||
|
|
|
@ -30,7 +30,7 @@ GenericChatForm::GenericChatForm(QObject *parent) :
|
|||
|
||||
mainWidget = new QWidget(); headWidget = new QWidget();
|
||||
|
||||
nameLabel = new QLabel();
|
||||
nameLabel = new CroppingLabel();
|
||||
avatarLabel = new QLabel();
|
||||
QHBoxLayout *headLayout = new QHBoxLayout(), *mainFootLayout = new QHBoxLayout();
|
||||
headTextLayout = new QVBoxLayout();
|
||||
|
@ -72,29 +72,11 @@ GenericChatForm::GenericChatForm(QObject *parent) :
|
|||
videoButton->setObjectName("green");
|
||||
videoButton->setStyleSheet(Style::get(":/ui/videoButton/videoButton.css"));
|
||||
|
||||
QString volButtonStylesheet = "";
|
||||
try
|
||||
{
|
||||
QFile f(":/ui/volButton/volButton.css");
|
||||
f.open(QFile::ReadOnly | QFile::Text);
|
||||
QTextStream volButtonStylesheetStream(&f);
|
||||
volButtonStylesheet = volButtonStylesheetStream.readAll();
|
||||
}
|
||||
catch (int e) {}
|
||||
|
||||
QString volButtonStylesheet = Style::get(":/ui/volButton/volButton.css");
|
||||
volButton->setObjectName("green");
|
||||
volButton->setStyleSheet(volButtonStylesheet);
|
||||
|
||||
QString micButtonStylesheet = "";
|
||||
try
|
||||
{
|
||||
QFile f(":/ui/micButton/micButton.css");
|
||||
f.open(QFile::ReadOnly | QFile::Text);
|
||||
QTextStream micButtonStylesheetStream(&f);
|
||||
micButtonStylesheet = micButtonStylesheetStream.readAll();
|
||||
}
|
||||
catch (int e) {}
|
||||
|
||||
QString micButtonStylesheet = Style::get(":/ui/micButton/micButton.css");
|
||||
micButton->setObjectName("green");
|
||||
micButton->setStyleSheet(micButtonStylesheet);
|
||||
|
||||
|
@ -115,7 +97,6 @@ GenericChatForm::GenericChatForm(QObject *parent) :
|
|||
headWidget->setLayout(headLayout);
|
||||
headLayout->addWidget(avatarLabel);
|
||||
headLayout->addLayout(headTextLayout);
|
||||
headLayout->addStretch();
|
||||
headLayout->addLayout(volMicLayout);
|
||||
headLayout->addWidget(callButton);
|
||||
headLayout->addWidget(videoButton);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "widget/croppinglabel.h"
|
||||
#include "widget/chatareawidget.h"
|
||||
#include "widget/tool/chattextedit.h"
|
||||
|
||||
|
@ -58,7 +59,8 @@ protected slots:
|
|||
void onEmoteInsertRequested(QString str);
|
||||
|
||||
protected:
|
||||
QLabel *nameLabel, *avatarLabel;
|
||||
CroppingLabel *nameLabel;
|
||||
QLabel *avatarLabel;
|
||||
QWidget *mainWidget, *headWidget;
|
||||
QPushButton *fileButton, *emoteButton, *callButton, *videoButton, *volButton, *micButton;
|
||||
QVBoxLayout *headTextLayout;
|
||||
|
|
Loading…
Reference in New Issue
Block a user