Index: sources/gui/qml/compounds/TouchGrid.qml =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r90d21320e3fafd64ee2e9241ce4065aca86625ff --- sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision 90d21320e3fafd64ee2e9241ce4065aca86625ff) @@ -53,10 +53,27 @@ property int colCount : itemsText.length > rowCount ? Math.ceil(itemsText.length / rowCount) : 1 readonly property int titleTopMargin: 110 + readonly property alias itemsVisibleCount : _private.itemsVisibleCount + signal itemClicked(int vIndex) + QtObject { id: _private + property int itemsVisibleCount : 0 + } + + height: parent.height + onItemsVisibleChanged: { + let count = 0 + for ( let itemVisible of itemsVisible ) { + if ( itemVisible ) { + count++ + } + } + _private.itemsVisibleCount = count + } + function undef(vValue, vOtherwise) { if ( vValue === undefined ) { return vOtherwise @@ -72,7 +89,7 @@ columns : _root.colCount rows : _root.rowCount rowSpacing : 25 - columnSpacing : 100 + columnSpacing : itemsVisibleCount > rowCount ? 100 : 0 Repeater { model : _root.itemsText TouchRect { id: _touchItem