Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -r11887705270e9c700e297610ed1af479bae4079e -rd473be913284c14f14a6e5b18446cceafc3e1265 --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 11887705270e9c700e297610ed1af479bae4079e) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision d473be913284c14f14a6e5b18446cceafc3e1265) @@ -4,6 +4,8 @@ import "qrc:/globals" Item { + property alias settingsButton: _settingsRect.button + height: Variables.mainMenuHeight anchors { right: parent.right @@ -20,56 +22,32 @@ spacing : Variables.mainMenuButtonSpacing leftPadding : Variables.mainMenuButtonSpacing rightPadding: Variables.mainMenuButtonSpacing - Rectangle { id : _treatmentRect + TouchRect { id : _treatmentRect width: Variables.mainMenuButtonWidth height: parent.height - color: "transparent" - Text { id: _treatmentText - anchors.centerIn: parent - color: Colors.textMain - text: qsTr("Treatment") - font.pixelSize: Fonts.fontPixelButton + text.text: qsTr("Treatment") + border.width: 0 + button.onPressed: { + _highlightRect.x = _treatmentRect.x } - MouseArea { id: _treatmentMouseArea - anchors.fill: parent - onPressed: { - _highlightRect.x = _treatmentRect.x - } - } } - Rectangle { id : _managerRect + TouchRect { id : _managerRect width: Variables.mainMenuButtonWidth height: parent.height - color: "transparent" - Text { id: _managerText - anchors.centerIn: parent - color: Colors.textMain - text: qsTr("Manager") - font.pixelSize: Fonts.fontPixelButton + text.text: qsTr("Manager") + border.width: 0 + button.onPressed: { + _highlightRect.x = _managerRect.x } - MouseArea { id: _managerMouseArea - anchors.fill: parent - onPressed: { - _highlightRect.x = _managerRect.x - } - } } - Rectangle { id : _settingsRect + TouchRect { id : _settingsRect width: Variables.mainMenuButtonWidth height: parent.height - color: "transparent" - Text { id: _settingsText - anchors.centerIn: parent - color: Colors.textMain - text: qsTr("Settings") - font.pixelSize: Fonts.fontPixelButton + text.text: qsTr("Settings") + border.width: 0 + button.onPressed: { + _highlightRect.x = _settingsRect.x } - MouseArea { id: _settingsMouseArea - anchors.fill: parent - onPressed: { - _highlightRect.x = _settingsRect.x - } - } } } Rectangle { id : _highlightRect