Commit 12d41a88 authored by Aurélien Gâteau's avatar Aurélien Gâteau

Fix blinking when moving the mouse over an hidden item

The opacity of the unhovered pixmap must be gradually reduced while
animating otherwise the alpha channel saturates.

REVIEW: 108858
BUG: 299371
FIXED-IN: 4.10.1
parent 1eee109f
......@@ -249,13 +249,14 @@ void KStandardItemListWidget::paint(QPainter* painter, const QStyleOptionGraphic
const KItemListStyleOption& itemListStyleOption = styleOption();
if (isHovered()) {
const qreal opacity = painter->opacity();
// Blend the unhovered and hovered pixmap if the hovering
// animation is ongoing
if (hoverOpacity() < 1.0) {
painter->setOpacity((1.0 - hoverOpacity()) * opacity);
drawPixmap(painter, m_pixmap);
}
const qreal opacity = painter->opacity();
painter->setOpacity(hoverOpacity() * opacity);
drawPixmap(painter, m_hoverPixmap);
painter->setOpacity(opacity);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment