mobile/profile: ensure profile opacity resets when zooming

It's possible for our code to think that the user wants to pan the
profile before realizing that the user actually is making a pinch
gesture. In that case the profile could get stuck in semi-transparent
mode. This prevents that from happening by explicitly resetting the
opacity to 1.0 when we start a pinch.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-03-24 16:05:12 -07:00
parent 6629d046b7
commit 69272eefa8

View file

@ -239,6 +239,10 @@ Item {
anchors.fill: parent
pinch.dragAxis: Pinch.XAndYAxis
onPinchStarted: {
// it's possible that we thought this was a pan and reduced opacity
// before realizing that this is actually a pinch/zoom. So let's reset this
// just in case
qmlProfile.opacity = 1.0
if (manager.verboseEnabebled)
manager.appendTextToLog("pinch started w/ previousScale " + qmlProfile.lastScale)
}