From bb832d15e85a6beba6fc35eae60afa827ffbed5e Mon Sep 17 00:00:00 2001 From: thunder2 Date: Mon, 16 May 2011 12:04:43 +0000 Subject: [PATCH] Added word wrap to the title of the thread and the subject of the message to avoid the stretch of the splitter. Changed style sheet of the tags in MessageDialog to gradient color. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4203 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/ForumsDialog.ui | 10 +- retroshare-gui/src/gui/MessagesDialog.ui | 205 ++++++++-------------- retroshare-gui/src/gui/common/TagDefs.cpp | 9 +- 3 files changed, 79 insertions(+), 145 deletions(-) diff --git a/retroshare-gui/src/gui/ForumsDialog.ui b/retroshare-gui/src/gui/ForumsDialog.ui index e9d5e5f18..dc9e23929 100644 --- a/retroshare-gui/src/gui/ForumsDialog.ui +++ b/retroshare-gui/src/gui/ForumsDialog.ui @@ -904,20 +904,14 @@ p, li { white-space: pre-wrap; } - - - 0 - 0 - - QLabel#threadTitle{ border: 2px solid #CCCCCC; border-radius: 6px; background: white;} - - + + true Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse diff --git a/retroshare-gui/src/gui/MessagesDialog.ui b/retroshare-gui/src/gui/MessagesDialog.ui index 3632a2ef9..045fd5d2b 100644 --- a/retroshare-gui/src/gui/MessagesDialog.ui +++ b/retroshare-gui/src/gui/MessagesDialog.ui @@ -1431,9 +1431,6 @@ p, li { white-space: pre-wrap; } - - 6 - 6 @@ -1462,23 +1459,11 @@ p, li { white-space: pre-wrap; } 0 - - - 0 - 12 - - - - - 16777215 - 10 - - - 10 - 75 - true + 9 + 50 + false @@ -1489,39 +1474,6 @@ p, li { white-space: pre-wrap; } - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 9 - - - - - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - @@ -1530,23 +1482,11 @@ p, li { white-space: pre-wrap; } 0 - - - 0 - 12 - - - - - 16777215 - 10 - - - 10 - 75 - true + 9 + 50 + false @@ -1598,23 +1538,11 @@ p, li { white-space: pre-wrap; } 0 - - - 0 - 12 - - - - - 16777215 - 10 - - - 10 - 75 - true + 9 + 50 + false @@ -1625,27 +1553,6 @@ p, li { white-space: pre-wrap; } - - - - - 9 - - - - Qt::LeftToRight - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - @@ -1664,23 +1571,11 @@ p, li { white-space: pre-wrap; } 0 - - - 0 - 12 - - - - - 16777215 - 10 - - - 10 - 75 - true + 9 + 50 + false @@ -1702,23 +1597,11 @@ p, li { white-space: pre-wrap; } 0 - - - 0 - 12 - - - - - 16777215 - 10 - - - 10 - 75 - true + 9 + 50 + false @@ -1759,9 +1642,9 @@ p, li { white-space: pre-wrap; } - 10 - 75 - true + 9 + 50 + false @@ -1775,6 +1658,58 @@ p, li { white-space: pre-wrap; } + + + + + + + 0 + 0 + + + + + 9 + + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + + 0 + 0 + + + + + 9 + + + + Qt::LeftToRight + + + Date + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + diff --git a/retroshare-gui/src/gui/common/TagDefs.cpp b/retroshare-gui/src/gui/common/TagDefs.cpp index 60075002c..a4c12f0ed 100644 --- a/retroshare-gui/src/gui/common/TagDefs.cpp +++ b/retroshare-gui/src/gui/common/TagDefs.cpp @@ -62,7 +62,12 @@ const QString TagDefs::labelStyleSheet(const QColor &color) textColor = qRgb(0, 0, 0); } - return QString("QLabel{padding-left: 2px; padding-right: 2px; color: #%1; background-color: #%2; border-radius: 3px}") + QColor colorBorder = color.darker(120); + QColor colorGradient = color.lighter(150); + + return QString("QLabel{padding-left: 2px; padding-right: 2px; color: #%1; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #%2, stop:1 #%3); border-radius: 3px; border-color: #%4; border-width: 1; border-style: solid}") .arg(textColor & RGB_MASK, 6, 16, QChar('0')) - .arg(color.rgb() & RGB_MASK, 6, 16, QChar('0')); + .arg(colorGradient.rgb() & RGB_MASK, 6, 16, QChar('0')) + .arg(color.rgb() & RGB_MASK, 6, 16, QChar('0')) + .arg(colorBorder.rgb() & RGB_MASK, 6, 16, QChar('0')); }