m_minTextHeight(-1),
m_timer(0)
{
- setMinimumHeight(KIcon::SizeSmall);
+ setMinimumHeight(K3Icon::SizeSmall);
m_timer = new QTimer(this);
connect(m_timer, SIGNAL(timeout()),
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);
// 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)
const int blue = (c1.blue() * recip + c2.blue() * percent) / 100;
return QColor(red, green, blue);
}
+
+#include "statusbarmessagelabel.moc"