From 69272eefa82493db2993d90cf82884dd5ee46ee2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 24 Mar 2020 16:05:12 -0700 Subject: 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 --- mobile-widgets/qml/DiveDetailsView.qml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml index 3eb0ec2d2..630ac3dbe 100644 --- a/mobile-widgets/qml/DiveDetailsView.qml +++ b/mobile-widgets/qml/DiveDetailsView.qml @@ -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) } -- cgit v1.2.3-70-g09d2