1
0

qml: don't apply ElListView deadzones on Linux desktop

otherwise I can't click on list items if the window is moved too far to the right :O

follow-up 583afefe33

Note: on modern Android, apps don't always run full-screen.
      You can pop them out into small windows and move them.
      Haven't tested how the deadzones work then though.
This commit is contained in:
SomberNight
2023-08-10 15:22:36 +00:00
parent dfa0dd47b7
commit 5a3abdde85

View File

@@ -26,13 +26,15 @@ ListView {
// android back gesture is used
function layoutExclusionZones() {
var reserve = constants.fingerWidth / 2
var p = root.mapToGlobal(0, 0)
var p = root.mapToGlobal(0, 0) // note: coords on whole *screen*, not just window
width_left_exclusion_zone = Math.max(0, reserve - p.x)
p = root.mapToGlobal(width, 0)
width_right_exclusion_zone = Math.max(0, reserve - (app.width - p.x))
}
Component.onCompleted: {
layoutExclusionZones()
if (AppController.isAndroid()) {
layoutExclusionZones()
}
}
}