diff options
| author | Zack Rusin <[email protected]> | 2006-12-04 06:00:07 +0000 |
|---|---|---|
| committer | Zack Rusin <[email protected]> | 2006-12-04 06:00:07 +0000 |
| commit | 45d82b30417ce8a747eab2baab7a5618a069bbfa (patch) | |
| tree | 66df8d14ca8f3fdf91bc1466bf27bd0b4b67eaa6 /src | |
| parent | 65c0544a2a7983dc65a1e0e294ce2149c29f6c54 (diff) | |
the widget is double-buffered by default so don't triple-buffer
plus removing another depdecation warning
svn path=/trunk/playground/utils/dolphin/; revision=610303
Diffstat (limited to 'src')
| -rw-r--r-- | src/statusbarmessagelabel.cpp | 7 | ||||
| -rw-r--r-- | src/statusbarspaceinfo.cpp | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/statusbarmessagelabel.cpp b/src/statusbarmessagelabel.cpp index 0604b2633..43ad1b77e 100644 --- a/src/statusbarmessagelabel.cpp +++ b/src/statusbarmessagelabel.cpp @@ -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) diff --git a/src/statusbarspaceinfo.cpp b/src/statusbarspaceinfo.cpp index 0b2c4d133..b7a1756c3 100644 --- a/src/statusbarspaceinfo.cpp +++ b/src/statusbarspaceinfo.cpp @@ -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, |
