diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2013-05-08 15:04:16 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-09 12:17:59 +0200 |
commit | 71034bb2ea24b47fd586f995f369dd78fabc431c (patch) | |
tree | f9eab4262fb928ccbd9e3c261a5e9cd7c3174270 /src/widgets | |
parent | 95cab90b1023a824017b6d22f62987ba9742b6b3 (diff) |
QMacStyle: fix transient scrollbar fade out animation
If a transient scrollbar was hidden during the fade out animation,
it got stuck visible after being shown again. A regression introduced
by f52177829a20b55624168870498947b28b82d220.
Task-number: QTBUG-31060
Change-Id: I1cda16c6afa4370cce4702d3b4fdaee9f44f9ab9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/styles/qmacstyle_mac.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 8ff6419075..e56a1d6e7e 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -4947,7 +4947,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 if (cc == CC_ScrollBar && proxy()->styleHint(SH_ScrollBar_Transient, opt, widget)) { bool wasActive = false; - CGFloat opacity = 1.0; + CGFloat opacity = 0.0; CGFloat expandScale = 1.0; CGFloat expandOffset = -1.0; bool shouldExpand = false; @@ -4973,6 +4973,10 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex oldState != slider->state || oldActiveControls != slider->activeSubControls) { + // if the scrollbar is transient or its attributes, geometry or + // state has changed, the opacity is reset back to 100% opaque + opacity = 1.0; + styleObject->setProperty("_q_stylepos", slider->sliderPosition); styleObject->setProperty("_q_stylemin", slider->minimum); styleObject->setProperty("_q_stylemax", slider->maximum); |