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);
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)
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,