diff options
author | Andy Shaw <andy.shaw@digia.com> | 2014-12-03 09:43:05 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@digia.com> | 2014-12-03 14:30:44 +0100 |
commit | e21fa33b9e115a0b56fb7b5cdd5f28bdcb36dca1 (patch) | |
tree | 0a3a9967ae823cea486a71c673a1e5d3b090d4b3 | |
parent | 179553ff3ee4e3ce0904b468f1377451752505f6 (diff) |
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 <allan.jensen@theqtcompany.com>
-rw-r--r-- | Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp | 4 |
1 files 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<QWidget*>(widgetForPainter(painter)); MappedStyleOption<QStyleOptionButton> 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); |