mirror of
https://invent.kde.org/system/dolphin
synced 2024-07-04 17:30:55 +00:00
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
This commit is contained in:
parent
65c0544a2a
commit
45d82b3041
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user