Index: sources/gui/qml/pages/Home.qml =================================================================== diff -u -r11887705270e9c700e297610ed1af479bae4079e -rd473be913284c14f14a6e5b18446cceafc3e1265 --- sources/gui/qml/pages/Home.qml (.../Home.qml) (revision 11887705270e9c700e297610ed1af479bae4079e) +++ sources/gui/qml/pages/Home.qml (.../Home.qml) (revision d473be913284c14f14a6e5b18446cceafc3e1265) @@ -1,17 +1,18 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 +import QtGraphicalEffects 1.12 import "qrc:/globals" +import "qrc:/components" Item { id: root - property int favoriteCount: 0 - property alias startTreatmentMouseArea: _startTreatmentMouseArea - property alias createTreatmentMouseArea: _createTreatmentMouseArea + property alias startTreatmentButton : _startTreatmentRect.button + property alias createTreatmentButton: _createTreatmentRect.button - width: Variables.applicationWidth - height:Variables.applicationHeight + property int favoriteCount: 0 - property alias versionText: versionText + width : Variables.applicationWidth + height: Variables.applicationHeight Rectangle { id: _backgroundRect anchors.fill: parent @@ -21,70 +22,15 @@ Column { spacing: 20 anchors.centerIn: parent - Text { id: _titleText + Title { id: _titleText width: parent.width - bottomPadding: 25 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - color: Colors.textMain text: qsTr("Good Morning") - font.pixelSize: Fonts.fontPixelTitle } - Rectangle { id : _startTreatmentRect - width: 425 - height: 70 - radius: 50 - color: Colors.backgroundMain - border { - color: Colors.borderButton - width: Variables.borderWidth - } - Text { id: _startTreatmentText - anchors.centerIn: parent - color: Colors.textMain - text: qsTr("START TREATMENT (%1)").arg(favoriteCount) - font.pixelSize: Fonts.fontPixelButton - } - MouseArea { id: _startTreatmentMouseArea - anchors.fill: parent - } + TouchRect { id : _startTreatmentRect + text.text: qsTr("START TREATMENT (%1)").arg(favoriteCount) } - - Rectangle { id : _createTreatmentRect - width: 425 - height: 70 - radius: 50 - color: Colors.backgroundMain - border { - color: Colors.borderButton - width: Variables.borderWidth - } - Text { id: _createTreatmentText - anchors.centerIn: parent - color: Colors.textMain - text: qsTr("CREATE TREATMENT") - font.pixelSize: Fonts.fontPixelButton - } - MouseArea { id: _createTreatmentMouseArea - anchors.fill: parent - } - + TouchRect { id : _createTreatmentRect + text.text: qsTr("CREATE TREATMENT") } } - - Text { id: versionText - color: Colors.textMain - x: 1172 - y: 767 - width: 104 - height: 27 - text: qsTr("0.1") - horizontalAlignment: Text.AlignRight - anchors.bottom: parent.bottom - anchors.bottomMargin: 6 - anchors.right: parent.right - anchors.rightMargin: 4 - font.pixelSize: 14 - } - }