From e21fa33b9e115a0b56fb7b5cdd5f28bdcb36dca1 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 3 Dec 2014 09:43:05 +0100 Subject: Disable the animation so the style renders buttons correctly Previously just the style was checked to see if it was one that supported animations on buttons. However when a stylesheet is used then it would not correctly be picked up. Therefore the animations are disabled directly using the property available on the styleObject. Task-number: QTBUG-39400 Change-Id: I99c205bf61d98f9bfefc8c9c6f9806d3d068abc4 Reviewed-by: Allan Sandfeld Jensen --- Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp b/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp index db3994667..f967a45a6 100644 --- a/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp +++ b/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp @@ -248,8 +248,8 @@ void QStyleFacadeImp::paintButton(QPainter* painter, QStyleFacade::ButtonType ty QWidget* widget = qobject_cast(widgetForPainter(painter)); MappedStyleOption option(widget, proxyOption); - if (m_style->inherits("QWindowsVistaStyle") || QApplication::style()->inherits("QWindowsVistaStyle")) - option.styleObject = 0; + if (option.styleObject) + option.styleObject->setProperty("_q_no_animation", true); if (type == PushButton) style()->drawControl(QStyle::CE_PushButton, &option, painter, widget); -- cgit v1.2.3