Index: sources/gui/qml/components/TouchArea.qml =================================================================== diff -u -r2f7a4176a08ba884281b370d452f19c25501a4b4 -r442d1c4f53c96991d4103485ff5ff683ed00d4f7 --- sources/gui/qml/components/TouchArea.qml (.../TouchArea.qml) (revision 2f7a4176a08ba884281b370d452f19c25501a4b4) +++ sources/gui/qml/components/TouchArea.qml (.../TouchArea.qml) (revision 442d1c4f53c96991d4103485ff5ff683ed00d4f7) @@ -28,13 +28,21 @@ * next to the right edge of the component. */ Item { id : _root - property string title : "" - property bool isTouchable : true + enum Orientation { + Horizontal, + Vertical + } + + property string title : "" + property int titleLetterSpacing : 3 + property bool isTouchable : true + property int orientation : TouchArea.Orientation.Horizontal property list components - readonly property int titleVSpacing : 20 - readonly property int componentsHSpacing : 80 - readonly property int arrowSpacing : 40 + property int titleVSpacing : 20 + property int componentsHSpacing : 80 + property int componentsVSpacing : 0 + property int arrowSpacing : 40 signal clicked() @@ -43,18 +51,19 @@ clip: true Column { id: _column - width: Math.max(_titleText.width , _row.width) - height: _titleText.height + _row.height - spacing: titleVSpacing - Row { - Text { id: _titleText - text: _root.title - font.pixelSize: Fonts.fontPixelTouchAreaTitle - color: Colors.touchTextAreaTitle - } + width : Math.max(_titleText.width , _grid.width) + height : _titleText.height + _grid.height + spacing : titleVSpacing + Text { id: _titleText + text: _root.title + font.pixelSize: Fonts.fontPixelTouchAreaTitle + font.letterSpacing: titleLetterSpacing + color: Colors.touchTextAreaTitle } - Row { id: _row - spacing: componentsHSpacing + Grid { id: _grid + columns : orientation === TouchArea.Orientation.Horizontal ? components.length : 1 + rows : orientation === TouchArea.Orientation.Vertical ? components.length : 1 + spacing : orientation === TouchArea.Orientation.Horizontal ? componentsHSpacing : componentsVSpacing children: components } }