Index: sources/gui/qml/compounds/TouchGrid.qml =================================================================== diff -u -r2230a5b1b891f47b64165164710aa680ddfc7040 -r20b286ab574a6b8ad25a51aeb3477506f7dafc5d --- sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision 2230a5b1b891f47b64165164710aa680ddfc7040) +++ sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision 20b286ab574a6b8ad25a51aeb3477506f7dafc5d) @@ -31,6 +31,7 @@ property var itemsUnit : [] property var itemsEnabled : [] + property var itemsVisible : [] property var itemsHasImage : [] property var itemsHasLine : [] property var itemsTouchable : [] @@ -45,6 +46,8 @@ property real itemsValueLeftMargin : itemWidth / 2 property real itemsUnitLeftMargin : itemWidth / 4 + property bool alignCenter : true + property int rowCount : Math.floor( _root.height / itemHeight ) property int colCount : itemsText.length > rowCount ? Math.ceil(itemsText.length / rowCount) : 1 readonly property int titleTopMargin: 110 @@ -62,7 +65,8 @@ Grid { id: _grid flow: Grid.TopToBottom - anchors.centerIn: _root + anchors.centerIn: _root.alignCenter ? parent : undefined + anchors.top : ! _root.alignCenter ? _root.top : undefined columns : _root.colCount rows : _root.rowCount rowSpacing : 25 @@ -80,6 +84,7 @@ width : _root.itemWidth radius : Variables.dialogRadius enabled : undef( _root.itemsEnabled[index], true ) + visible : undef( _root.itemsVisible[index], true ) onClicked : _root.itemClicked(index) Text { id : _itemsValue text : undef( _root.itemsValue[index], "")