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
const KItemListStyleOption& itemListStyleOption = styleOption();
if (isHovered()) {
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) {
// 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);
}
drawPixmap(painter, m_pixmap);
}
- const qreal opacity = painter->opacity();
painter->setOpacity(hoverOpacity() * opacity);
drawPixmap(painter, m_hoverPixmap);
painter->setOpacity(opacity);
painter->setOpacity(hoverOpacity() * opacity);
drawPixmap(painter, m_hoverPixmap);
painter->setOpacity(opacity);