1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Make chatArea and msgEdit more like the mockup

This commit is contained in:
Kevin Flynn 2014-06-28 13:56:47 -07:00
parent 33e487d0dd
commit 36b2c496cb
5 changed files with 52 additions and 6 deletions

View File

@ -1,3 +1,12 @@
QScrollArea {
background: transparent;
border: 0 0 0 0;
}
QScrollArea > QWidget > QWidget {
background: transparent;
}
QScrollBar:vertical {
background: white;
width: 10px;
@ -10,7 +19,7 @@ QScrollBar::handle:vertical {
}
QScrollBar::handle:vertical:hover {
background: #e7e7e7;
background: #e3e3e3;
}
QScrollBar::handle:vertical:pressed {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

After

Width:  |  Height:  |  Size: 217 B

View File

@ -42,13 +42,25 @@ ChatForm::ChatForm(Friend* chatFriend)
chatArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
chatArea->setWidgetResizable(true);
chatArea->setContextMenuPolicy(Qt::CustomContextMenu);
chatArea->setFrameStyle(QFrame::NoFrame);
mainChatLayout->setColumnStretch(1,1);
mainChatLayout->setSpacing(10);
footButtonsSmall->setSpacing(2);
QString msgEditStylesheet = "";
try
{
QFile f("ui/msgEdit/msgEdit.css");
f.open(QFile::ReadOnly | QFile::Text);
QTextStream msgEditStylesheetStream(&f);
msgEditStylesheet = msgEditStylesheetStream.readAll();
}
catch (int e) {}
msgEdit->setStyleSheet(msgEditStylesheet);
msgEdit->setFixedHeight(50);
msgEdit->setFrameStyle(QFrame::NoFrame);
QString sendButtonStylesheet = "";
try
@ -61,10 +73,6 @@ ChatForm::ChatForm(Friend* chatFriend)
catch (int e) {}
sendButton->setStyleSheet(sendButtonStylesheet);
QPalette toxgreen;
toxgreen.setColor(QPalette::Button, QColor(107,194,96)); // Tox Green
QString fileButtonStylesheet = "";
try
{

View File

@ -39,9 +39,39 @@ GroupChatForm::GroupChatForm(Group* chatGroup)
namesList->setFont(small);
chatAreaWidget->setLayout(mainChatLayout);
QString chatAreaStylesheet = "";
try
{
QFile f("ui/chatArea/chatArea.css");
f.open(QFile::ReadOnly | QFile::Text);
QTextStream chatAreaStylesheetStream(&f);
chatAreaStylesheet = chatAreaStylesheetStream.readAll();
}
catch (int e) {}
chatArea->setStyleSheet(chatAreaStylesheet);
chatArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
chatArea->setWidgetResizable(true);
chatArea->setContextMenuPolicy(Qt::CustomContextMenu);
chatArea->setFrameStyle(QFrame::NoFrame);
mainChatLayout->setColumnStretch(1,1);
mainChatLayout->setSpacing(10);
QString msgEditStylesheet = "";
try
{
QFile f("ui/msgEdit/msgEdit.css");
f.open(QFile::ReadOnly | QFile::Text);
QTextStream msgEditStylesheetStream(&f);
msgEditStylesheet = msgEditStylesheetStream.readAll();
}
catch (int e) {}
msgEdit->setObjectName("group");
msgEdit->setStyleSheet(msgEditStylesheet);
msgEdit->setFixedHeight(50);
msgEdit->setFrameStyle(QFrame::NoFrame);
mainChatLayout->setColumnStretch(1,1);
mainChatLayout->setHorizontalSpacing(10);
@ -56,7 +86,6 @@ GroupChatForm::GroupChatForm(Group* chatGroup)
catch (int e) {}
sendButton->setStyleSheet(sendButtonStylesheet);
msgEdit->setFixedHeight(50);
sendButton->setFixedSize(50, 50);
main->setLayout(mainLayout);