Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -r45c7fe06db813c13eaec0bb5f8bfc2135063ea58 -rd4befd2d92ee54b57de33867a1e2517cafdd89d3 --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 45c7fe06db813c13eaec0bb5f8bfc2135063ea58) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision d4befd2d92ee54b57de33867a1e2517cafdd89d3) @@ -30,8 +30,18 @@ Item { id: _root property variant titles: [] - signal itemPressed(int index) + /*! + * \brief Emits when a menu item pressed + * \param vIndex is the index of the pressed item + */ + signal itemPressed(int vIndex) + /*! type:int + * this property holds the width of each partition + * regarding to the menuitem count and menu width + */ + property int partitionWidth: _row.width / (titles.length*2 + 1) + height: Variables.mainMenuHeight anchors { right : parent.right @@ -44,8 +54,8 @@ color: Colors.backgroundMainMenu } + Row { id: _row - property int partitionWidth: _row.width / (titles.length*2 + 1) anchors.fill: parent spacing : partitionWidth leftPadding : partitionWidth @@ -54,7 +64,7 @@ Repeater { id: _repeater model: titles TouchRect { id : _treatmentRect - width: _row.partitionWidth + width: partitionWidth height: parent.height text.text: modelData border.width: 0 @@ -68,8 +78,8 @@ Rectangle { id : _highlightRect color: Colors.backgroundButton - width: _row.partitionWidth - x : _row.partitionWidth + width: partitionWidth + x : partitionWidth height: 10 radius: 10 anchors.bottom: parent.bottom