summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-05-26 21:24:39 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-05-26 21:24:39 (GMT)
commit8d697d9aa2f07a3222dea561174f063c382449f1 (patch)
tree5206c4927231f608d1ed50609fa5a361b1fa7b77 /Swift/QtUI/QtStatusWidget.cpp
parentd65ae35e1e14c15c5ae9106e37254b163307934d (diff)
downloadswift-8d697d9aa2f07a3222dea561174f063c382449f1.zip
swift-8d697d9aa2f07a3222dea561174f063c382449f1.tar.bz2
Make better use of the elided text labels.
Cache the elided text to avoid recalculating and making the QLabel superclass recalculate everything. Also using plaintext with a font instead of richtext means that it doesn't have to deal with truncated html tags. Hopefully Resolves: #398
Diffstat (limited to 'Swift/QtUI/QtStatusWidget.cpp')
-rw-r--r--Swift/QtUI/QtStatusWidget.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swift/QtUI/QtStatusWidget.cpp b/Swift/QtUI/QtStatusWidget.cpp
index 784c0d4..7d39531 100644
--- a/Swift/QtUI/QtStatusWidget.cpp
+++ b/Swift/QtUI/QtStatusWidget.cpp
@@ -50,6 +50,9 @@ QtStatusWidget::QtStatusWidget(QWidget *parent) : QWidget(parent), editCursor_(Q
page1Layout->addWidget(statusIcon_);
statusTextLabel_ = new QtElidingLabel(this);
+ QFont font = statusTextLabel_->font();
+ font.setItalic(true);
+ statusTextLabel_->setFont(font);
page1Layout->addWidget(statusTextLabel_);
icons_[StatusShow::Online] = QIcon(":/icons/online.png");
@@ -210,7 +213,8 @@ void QtStatusWidget::setStatusText(const QString& text) {
statusEdit_->setText(text);
QString escapedText(text.isEmpty() ? "(No message)" : text);
escapedText.replace("<","&lt;");
- statusTextLabel_->setText("<i>" + escapedText + "</i>");
+// statusTextLabel_->setText("<i>" + escapedText + "</i>");
+ statusTextLabel_->setText(escapedText);
}
void QtStatusWidget::setStatusType(StatusShow::Type type) {