#include <KDebug>
+#include <KGlobalSettings>
#include <QApplication>
#include <QPainter>
#include <QPropertyAnimation>
focusRectOption.rect = textBounds.adjusted(1, 1, -1, -1);
}
- focusRectOption.state = QStyle::State_Enabled | QStyle::State_Item;
+ focusRectOption.state = QStyle::State_Enabled | QStyle::State_Item | QStyle::State_KeyboardFocusChange;
if (m_selected) {
focusRectOption.state |= QStyle::State_Selected;
}
if (!m_hoverAnimation) {
m_hoverAnimation = new QPropertyAnimation(this, "hoverOpacity", this);
- m_hoverAnimation->setDuration(200);
+ const int duration = (KGlobalSettings::graphicEffectsLevel() == KGlobalSettings::NoEffects) ? 1 : 200;
+ m_hoverAnimation->setDuration(duration);
connect(m_hoverAnimation, SIGNAL(finished()), this, SLOT(slotHoverAnimationFinished()));
}
m_hoverAnimation->stop();