on xenial help sign in
DashContent: set off-screen delegates invisible
commit10a265f8c8b2dd31a5d6fe309b62c9d357ac9212 authorGerry Boland <gerry.boland@canonical.com> dateMon 14 Jul 2014, 18:51 (12 years ago) parent97f99d4
1 file changed+4
qml/Dash/DashContent.qml+4
qml/Dash/DashContent.qml+4
@@ -121,6 +121,10 @@ Item {
121121 Loader {
122122 width: ListView.view.width
123123 height: ListView.view.height
124+ visible: { // hide delegate if offscreen
125+ var xPositionRelativetoView = ListView.view.contentX - x
126+ return xPositionRelativetoView > -width && xPositionRelativetoView < width
127+ }
124128 asynchronous: true
125129 // TODO This if will eventually go away since we're killing DashApps.qml
126130 // once we move app closing to the spread