Browse Source

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.
master
SomberNight 2 years ago
parent
commit
5a3abdde85
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 6
      electrum/gui/qml/components/controls/ElListView.qml

6
electrum/gui/qml/components/controls/ElListView.qml

@ -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()
}
}
}

Loading…
Cancel
Save