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:
parent
33e487d0dd
commit
36b2c496cb
@ -1,3 +1,12 @@
|
|||||||
|
QScrollArea {
|
||||||
|
background: transparent;
|
||||||
|
border: 0 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollArea > QWidget > QWidget {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
QScrollBar:vertical {
|
QScrollBar:vertical {
|
||||||
background: white;
|
background: white;
|
||||||
width: 10px;
|
width: 10px;
|
||||||
@ -10,7 +19,7 @@ QScrollBar::handle:vertical {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QScrollBar::handle:vertical:hover {
|
QScrollBar::handle:vertical:hover {
|
||||||
background: #e7e7e7;
|
background: #e3e3e3;
|
||||||
}
|
}
|
||||||
|
|
||||||
QScrollBar::handle:vertical:pressed {
|
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 |
@ -42,13 +42,25 @@ ChatForm::ChatForm(Friend* chatFriend)
|
|||||||
chatArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
chatArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
chatArea->setWidgetResizable(true);
|
chatArea->setWidgetResizable(true);
|
||||||
chatArea->setContextMenuPolicy(Qt::CustomContextMenu);
|
chatArea->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
chatArea->setFrameStyle(QFrame::NoFrame);
|
||||||
|
|
||||||
mainChatLayout->setColumnStretch(1,1);
|
mainChatLayout->setColumnStretch(1,1);
|
||||||
mainChatLayout->setSpacing(10);
|
mainChatLayout->setSpacing(10);
|
||||||
|
|
||||||
footButtonsSmall->setSpacing(2);
|
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->setFixedHeight(50);
|
||||||
|
msgEdit->setFrameStyle(QFrame::NoFrame);
|
||||||
|
|
||||||
QString sendButtonStylesheet = "";
|
QString sendButtonStylesheet = "";
|
||||||
try
|
try
|
||||||
@ -61,10 +73,6 @@ ChatForm::ChatForm(Friend* chatFriend)
|
|||||||
catch (int e) {}
|
catch (int e) {}
|
||||||
sendButton->setStyleSheet(sendButtonStylesheet);
|
sendButton->setStyleSheet(sendButtonStylesheet);
|
||||||
|
|
||||||
QPalette toxgreen;
|
|
||||||
toxgreen.setColor(QPalette::Button, QColor(107,194,96)); // Tox Green
|
|
||||||
|
|
||||||
|
|
||||||
QString fileButtonStylesheet = "";
|
QString fileButtonStylesheet = "";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -39,9 +39,39 @@ GroupChatForm::GroupChatForm(Group* chatGroup)
|
|||||||
namesList->setFont(small);
|
namesList->setFont(small);
|
||||||
|
|
||||||
chatAreaWidget->setLayout(mainChatLayout);
|
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->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
chatArea->setWidgetResizable(true);
|
chatArea->setWidgetResizable(true);
|
||||||
chatArea->setContextMenuPolicy(Qt::CustomContextMenu);
|
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->setColumnStretch(1,1);
|
||||||
mainChatLayout->setHorizontalSpacing(10);
|
mainChatLayout->setHorizontalSpacing(10);
|
||||||
|
|
||||||
@ -56,7 +86,6 @@ GroupChatForm::GroupChatForm(Group* chatGroup)
|
|||||||
catch (int e) {}
|
catch (int e) {}
|
||||||
sendButton->setStyleSheet(sendButtonStylesheet);
|
sendButton->setStyleSheet(sendButtonStylesheet);
|
||||||
|
|
||||||
msgEdit->setFixedHeight(50);
|
|
||||||
sendButton->setFixedSize(50, 50);
|
sendButton->setFixedSize(50, 50);
|
||||||
|
|
||||||
main->setLayout(mainLayout);
|
main->setLayout(mainLayout);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user