Don't do any transitions if the widget is disabled

On Windows 8 it would end up changing the look of the QLineEdit when the
mouse hovered over it even though it was not enabled. None of the
Windows platforms show the lineedit changing when hovered over if it is
disabled so we can skip the whole thing.

Task-number: QTBUG-29224

Change-Id: Ib9495bf395477f114e91b744e1b1209c9e11f336
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This commit is contained in:
Andy Shaw 2013-04-22 23:28:06 +02:00 committed by The Qt Project
parent b06b519759
commit 89e2319322

View File

@ -314,7 +314,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
return;
}
if (d->transitionsEnabled() && canAnimate(option)) {
if ((option->state & State_Enabled) && d->transitionsEnabled() && canAnimate(option)) {
{
QRect oldRect;
QRect newRect;