set for timestamp own color

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@352 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2008-02-18 14:52:51 +00:00
parent 71a4cbd869
commit 39d8b258ab

View File

@ -131,13 +131,13 @@ void ChatDialog::insertChat()
/* determine how many spaces to add */ /* determine how many spaces to add */
int n = msgWidget->width(); //int n = msgWidget->width();
/* now spaces = (width - txt width) / (pixel / space) /* now spaces = (width - txt width) / (pixel / space)
*/ */
//std::cerr << "Width is : " << n << std::endl; //std::cerr << "Width is : " << n << std::endl;
n -= 256; /* 220 pixels for name */ /*n -= 256; 220 pixels for name */
if (n > 0) /*if (n > 0)
{ {
n = 2 + n / 10; n = 2 + n / 10;
} }
@ -145,7 +145,7 @@ void ChatDialog::insertChat()
{ {
n = 1; n = 1;
} }
n = 1 + n / 2; /* shrink it! */ n = 1 + n / 2;*/ /* shrink it! */
/* add in lines at the bottom */ /* add in lines at the bottom */
int ts = time(NULL); int ts = time(NULL);
@ -174,14 +174,14 @@ void ChatDialog::insertChat()
#else #else
extraTxt += "<br>\n"; extraTxt += "<br>\n";
#endif #endif
for(int i = 0; i < n; i++) /*for(int i = 0; i < n; i++)
{ {
extraTxt += " "; extraTxt += " ";
} }*/
QString timestamp = "[" + QDateTime::currentDateTime().toString("hh:mm:ss") + "]"; QString timestamp = "[" + QDateTime::currentDateTime().toString("hh:mm:ss") + "]";
QString name = QString::fromStdString(it->name); QString name = QString::fromStdString(it->name);
QString line = "<span style=\"color:#1D84C9\"><strong>" + timestamp + QString line = "<span style=\"color:#C00000\"><strong>" + timestamp + "</strong></span>" +
" " + name + "</strong></span> \n<br>"; "<span style=\"color:#2D84C9\"><strong>" + " " + name + "</strong></span> \<br>";
extraTxt += line; extraTxt += line;