]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbarmessagelabel.cpp
Use a KIO Job for applying the view properties recursively to sub directories.
[dolphin.git] / src / statusbarmessagelabel.cpp
index 9465f6de3cc2fa1a4d4bfbb558805eaca01eeecc..43ad1b77e4fb6c362b910194b607c4535b9fbe16 100644 (file)
@@ -37,7 +37,7 @@ StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) :
     m_minTextHeight(-1),
     m_timer(0)
 {
-    setMinimumHeight(KIcon::SizeSmall);
+    setMinimumHeight(K3Icon::SizeSmall);
 
     m_timer = new QTimer(this);
     connect(m_timer, SIGNAL(timeout()),
@@ -108,11 +108,10 @@ void StatusBarMessageLabel::setMinimumTextHeight(int min)
 
 void StatusBarMessageLabel::paintEvent(QPaintEvent* /* event */)
 {
-    QPixmap buffer(size());
-    QPainter painter(&buffer);
+    QPainter painter(this);
 
     // draw background
-    QColor backgroundColor(colorGroup().background());
+    QColor backgroundColor(palette().brush(QPalette::Background).color());
     QColor foregroundColor(KGlobalSettings::textColor());
     if (m_illumination > 0) {
         backgroundColor = mixColors(backgroundColor, QColor(255, 255, 64), m_illumination);
@@ -133,10 +132,8 @@ void StatusBarMessageLabel::paintEvent(QPaintEvent* /* event */)
 
     // draw text
     painter.setPen(foregroundColor);
-    painter.drawText(QRect(x, 0, width() - x, height()), Qt::AlignVCenter | Qt::WordBreak, m_text);
+    painter.drawText(QRect(x, 0, width() - x, height()), Qt::AlignVCenter | Qt::TextWordWrap, m_text);
     painter.end();
-
-    bitBlt(this, 0, 0, &buffer);
 }
 
 void StatusBarMessageLabel::resizeEvent(QResizeEvent* event)
@@ -217,3 +214,5 @@ QColor StatusBarMessageLabel::mixColors(const QColor& c1,
     const int blue  = (c1.blue()  * recip + c2.blue()  * percent) / 100;
     return QColor(red, green, blue);
 }
+
+#include "statusbarmessagelabel.moc"