diff --git a/ui/chatArea/innerStyle.css b/ui/chatArea/innerStyle.css index 5a1de4a94..61380b073 100644 --- a/ui/chatArea/innerStyle.css +++ b/ui/chatArea/innerStyle.css @@ -19,6 +19,7 @@ div.message { div.date { color: #000000; padding-left: 3px; + white-space: nowrap; } div.quote { diff --git a/widget/form/chatform.cpp b/widget/form/chatform.cpp index dc9e3f410..229d6c8d4 100644 --- a/widget/form/chatform.cpp +++ b/widget/form/chatform.cpp @@ -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); diff --git a/widget/form/chatform.h b/widget/form/chatform.h index 1527a701b..9407f1c11 100644 --- a/widget/form/chatform.h +++ b/widget/form/chatform.h @@ -68,7 +68,7 @@ private slots: private: Friend* f; - QLabel *statusMessageLabel; + CroppingLabel *statusMessageLabel; NetCamView* netcam; bool audioInputFlag; int callId; diff --git a/widget/form/genericchatform.cpp b/widget/form/genericchatform.cpp index 3b8fd20e2..fcffb2385 100644 --- a/widget/form/genericchatform.cpp +++ b/widget/form/genericchatform.cpp @@ -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); diff --git a/widget/form/genericchatform.h b/widget/form/genericchatform.h index 10f7a52f0..d8b20281d 100644 --- a/widget/form/genericchatform.h +++ b/widget/form/genericchatform.h @@ -25,6 +25,7 @@ #include #include +#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;