aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-24 16:05:12 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-25 09:28:05 -0700
commit69272eefa82493db2993d90cf82884dd5ee46ee2 (patch)
tree980f3ca263df3206b8ec80adc65a7a7e90fbaead /mobile-widgets/qml
parent6629d046b713e27a85ce2ba69b436629ddcf9804 (diff)
downloadsubsurface-69272eefa82493db2993d90cf82884dd5ee46ee2.tar.gz
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>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/DiveDetailsView.qml4
1 files changed, 4 insertions, 0 deletions
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)
}