Skip to content

Commit

Permalink
Merge pull request #352 from webOS-ports/tofe/fixes
Browse files Browse the repository at this point in the history
CardShell: fix reticle position
  • Loading branch information
Herrie82 authored Nov 23, 2023
2 parents b6f8050 + 939e0c8 commit 994f96f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions qml/CardShell.qml
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,18 @@ Rectangle {
fingerSize: Units.gu(5)
minimalFlickLength: Units.gu(10)
timeout: 2000
height: root.height
width: root.width

function convertRawPos(pos) {
return mapFromItem(root, pos.x, pos.y);
}
height: orientationHelper.height
width: orientationHelper.width

signal screenEdgeFlickEdgeLeft(bool timeout,point pos)
signal screenEdgeFlickEdgeRight(bool timeout, point pos)
signal screenEdgeFlickEdgeTop(bool timeout,point pos)
signal screenEdgeFlickEdgeBottom(bool timeout, point pos)

// onTouchBegin: orientationHelper.setLocked(true);
// onTouchEnd: orientationHelper.setLocked(false);
onTouchBegin: orientationHelper.setLocked(true);
onTouchEnd: orientationHelper.setLocked(false);
onGestureEvent: (gestureType, pos, timeout) => {
var screenPos = convertRawPos(pos);
var screenPos = orientationHelper.convertRawPos(pos);

switch (gestureType) {
case GestureHandler.TapGesture:
Expand Down

0 comments on commit 994f96f

Please sign in to comment.