on xenial help sign in
DashContent: set off-screen delegates invisible
10a265fGerry Boland
qml/Dash/DashContent.qml+4
@@ -121,6 +121,10 @@ Item {
121 Loader {
121 Loader {
122 width: ListView.view.width
122 width: ListView.view.width
123 height: ListView.view.height
123 height: ListView.view.height
124+ visible: { // hide delegate if offscreen
125+ var xPositionRelativetoView = ListView.view.contentX - x
126+ return xPositionRelativetoView > -width && xPositionRelativetoView < width
127+ }
124 asynchronous: true
128 asynchronous: true
125 // TODO This if will eventually go away since we're killing DashApps.qml
129 // TODO This if will eventually go away since we're killing DashApps.qml
126 // once we move app closing to the spread
130 // once we move app closing to the spread