From 40bb2f19ab0a68be52fdf6375a0fb9ea7209358b Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 24 Nov 2016 12:30:02 -0800 Subject: [PATCH] Click instead of swipe to change pages --- src/FlightMap/Widgets/InstrumentSwipeView.qml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/FlightMap/Widgets/InstrumentSwipeView.qml b/src/FlightMap/Widgets/InstrumentSwipeView.qml index 0a31ffb..8a52ea4 100644 --- a/src/FlightMap/Widgets/InstrumentSwipeView.qml +++ b/src/FlightMap/Widgets/InstrumentSwipeView.qml @@ -67,7 +67,7 @@ Item { Rectangle { height: radius * 2 width: radius * 2 - radius: 2.5 + radius: ScreenTools.defaultFontPixelWidth / 3 border.color: textColor border.width: 1 color: _currentPage == index ? textColor : "transparent" @@ -78,6 +78,21 @@ Item { MouseArea { anchors.fill: parent + onClicked: { + if (_currentPage == _maxPage) { + _currentPage = 0 + } else { + _currentPage++ + } + showPage(_currentPage) + } + } + + /* + Switching from swipe to click to change pages. Keeping swipe code for now in case of change back. + MouseArea { + anchors.fill: parent + property real xDragStart property real xFirstPageSave @@ -104,4 +119,5 @@ Item { showPage(_currentPage) } } + */ }