--- a/QTfrontend/ui/widget/chatwidget.cpp Wed Jan 23 23:57:47 2013 +0400
+++ b/QTfrontend/ui/widget/chatwidget.cpp Wed Jan 23 16:35:26 2013 -0500
@@ -197,29 +197,44 @@
m_hilightSound = "/Sounds/beep.ogg";
- mainLayout.setSpacing(1);
- mainLayout.setMargin(1);
- mainLayout.setSizeConstraint(QLayout::SetMinimumSize);
- mainLayout.setColumnStretch(0, 76);
- mainLayout.setColumnStretch(1, 24);
+ mainLayout.setMargin(0);
- chatEditLine = new SmartLineEdit(this);
- chatEditLine->setMaxLength(300);
- connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
+ QWidget * leftSideContainer = new QWidget();
+ leftSideContainer->setObjectName("leftSideContainer");
+ leftSideContainer->setStyleSheet("#leftSideContainer { border-width: 0px; background-color: #ffcc00; border-radius: 10px;} QTextBrowser, SmartLineEdit { background-color: rgb(13, 5, 68); }");
+ QVBoxLayout * leftSide = new QVBoxLayout(leftSideContainer);
+ leftSide->setSpacing(3);
+ leftSide->setMargin(3);
+ mainLayout.addWidget(leftSideContainer, 76);
- mainLayout.addWidget(chatEditLine, 2, 0);
+ // Chat view
chatText = new QTextBrowser(this);
-
chatText->document()->setDefaultStyleSheet(styleSheet());
-
chatText->setMinimumHeight(20);
chatText->setMinimumWidth(10);
chatText->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
chatText->setOpenLinks(false);
+ chatText->setStyleSheet("QTextBrowser { background-color: rgb(23, 11, 54); border-width: 0px; }");
connect(chatText, SIGNAL(anchorClicked(const QUrl&)),
this, SLOT(linkClicked(const QUrl&)));
- mainLayout.addWidget(chatText, 0, 0, 2, 1);
+ leftSide->addWidget(chatText, 1);
+
+ // Input box
+
+ // Normal: rgb(23, 11, 54)
+ // Hover: rgb(13, 5, 68)
+
+ chatEditLine = new SmartLineEdit();
+ chatEditLine->setMaxLength(300);
+ chatEditLine->setStyleSheet("SmartLineEdit { background-color: rgb(23, 11, 54); padding: 2px 8px; border-width: 0px; border-radius: 7px; } SmartLineEdit:hover, SmartLineEdit:focus { background-color: rgb(13, 5, 68); }");
+ chatEditLine->setFixedHeight(24);
+ chatEditLine->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+ connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
+
+ leftSide->addWidget(chatEditLine, 0);
+
+ // Nickname list
chatNicks = new QListView(this);
chatNicks->setIconSize(QSize(24, 16));
@@ -235,7 +250,8 @@
connect(chatNicks, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(nicksContextMenuRequested(QPoint)));
- mainLayout.addWidget(chatNicks, 0, 1, 3, 1);
+ mainLayout.addSpacing(0);
+ mainLayout.addWidget(chatNicks, 24);
// the userData is used to flag things that are even available when user
// is offline