]> cloud.milkyroute.net Git - dolphin.git/commitdiff
the widget is double-buffered by default so don't triple-buffer
authorZack Rusin <zack@kde.org>
Mon, 4 Dec 2006 06:00:07 +0000 (06:00 +0000)
committerZack Rusin <zack@kde.org>
Mon, 4 Dec 2006 06:00:07 +0000 (06:00 +0000)
plus removing another depdecation warning

svn path=/trunk/playground/utils/dolphin/; revision=610303

src/statusbarmessagelabel.cpp
src/statusbarspaceinfo.cpp

index 0604b263366b060523493d0f08eec784c1c72898..43ad1b77e4fb6c362b910194b607c4535b9fbe16 100644 (file)
@@ -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);
@@ -135,8 +134,6 @@ void StatusBarMessageLabel::paintEvent(QPaintEvent* /* event */)
     painter.setPen(foregroundColor);
     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)
index 0b2c4d1332be74c9f3b69d941ed27bd6cc714720..b7a1756c30782842175f281da99f08c58588234c 100644 (file)
@@ -66,7 +66,7 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
 
     const int widthDec = 3;  // visual decrement for the available width
 
-    const QColor c1 = colorGroup().background();
+    const QColor c1 = palette().brush(QPalette::Background).color();
     const QColor c2 = KGlobalSettings::buttonTextColor();
     const QColor frameColor((c1.red()   + c2.red())   / 2,
                             (c1.green() + c2.green()) / 2,