summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2014-12-03 09:43:05 +0100
committerAndy Shaw <andy.shaw@digia.com>2014-12-03 14:30:44 +0100
commite21fa33b9e115a0b56fb7b5cdd5f28bdcb36dca1 (patch)
tree0a3a9967ae823cea486a71c673a1e5d3b090d4b3
parent179553ff3ee4e3ce0904b468f1377451752505f6 (diff)
downloadqtwebkit-e21fa33b9e115a0b56fb7b5cdd5f28bdcb36dca1.tar.gz
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.cpp4
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);