Index: leahi.qrc =================================================================== diff -u -r931a67d0426e4ab266085e6e598937408164024c -r50e38888132835a21357dfadff7a9bb1ccfdd334 --- leahi.qrc (.../leahi.qrc) (revision 931a67d0426e4ab266085e6e598937408164024c) +++ leahi.qrc (.../leahi.qrc) (revision 50e38888132835a21357dfadff7a9bb1ccfdd334) @@ -74,11 +74,11 @@ resources/images/edit.png resources/images/edit-disabled.png resources/images/Lock.png - resources/images/Pause.png resources/images/Prescription.png resources/images/Settings.png resources/images/Unlock.png resources/images/Wifi.png + resources/images/PauseOrange.png sources/gui/qml/components/MainMenu.qml @@ -120,7 +120,7 @@ sources/gui/qml/components/UltrafiltrationButton.qml sources/gui/qml/components/ImageWave.qml sources/gui/qml/components/ImageClock.qml - sources/gui/qml/components/ImageLogoDDarkTransparent.qml + sources/gui/qml/components/ImageLogoDDarkTransparent.qml sources/gui/qml/components/ConfirmTreatmentTableEntry.qml sources/gui/qml/components/DebugDataColumn.qml sources/gui/qml/components/RangeSlider.qml Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -r712f4c8a1b2382919300895b4422b831471044a3 -r50e38888132835a21357dfadff7a9bb1ccfdd334 --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 712f4c8a1b2382919300895b4422b831471044a3) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 50e38888132835a21357dfadff7a9bb1ccfdd334) @@ -40,6 +40,7 @@ property int currentIndex : 0 property string currentTitle : titles[currentIndex] property bool disable : false + property int titlePixelSize : 40 /*! * \brief Emits when a menu item pressed @@ -106,7 +107,7 @@ anchors.fill: parent } - ImageLogoDDT { id: _image + ImageLogoDDarkTransparent { id: _image visible: hasLogo anchors.centerIn: parent } @@ -127,7 +128,7 @@ height : parent.height text.text : isItemVisible(index) ? modelData : "" // didn't change the visibility to preserve the button location and just didn't display the title and highlihgt bar. border.width: 0 - pixelSize : 40 //// ----- @LEAHIZED + pixelSize : titlePixelSize //// ----- @LEAHIZED onPressed: { emit_itemPressed(index) } Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r9f70ae0e4a2a053486198c4a505575044a7ab3be -r50e38888132835a21357dfadff7a9bb1ccfdd334 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 9f70ae0e4a2a053486198c4a505575044a7ab3be) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 50e38888132835a21357dfadff7a9bb1ccfdd334) @@ -34,6 +34,8 @@ readonly property int headerHeight : 100 readonly property int headerButtonsMargin : 35 readonly property int confirmButtonWidth : 155 + readonly property int headerBarDateTimeWidth : 200 + readonly property int defaultMargin : 20 readonly property int mainMenuHeight : 100 //// ----- @LEAHIZED @@ -103,6 +105,7 @@ readonly property int checkListViewItemHeight : 60 readonly property int pauseIconDiameter : 60 + readonly property int mainTreatmentIconDiameter : 45 readonly property int topBarMenuHeight : 100 //// ----- @LEAHIZED readonly property int sliderCircleDiameter : 30 Index: sources/gui/qml/main.qml =================================================================== diff -u -r1e44d84a258f8506550b176216481bb7cab2f102 -r50e38888132835a21357dfadff7a9bb1ccfdd334 --- sources/gui/qml/main.qml (.../main.qml) (revision 1e44d84a258f8506550b176216481bb7cab2f102) +++ sources/gui/qml/main.qml (.../main.qml) (revision 50e38888132835a21357dfadff7a9bb1ccfdd334) @@ -310,7 +310,7 @@ } Item { - width : 200 + width : Variables.headerBarDateTimeWidth anchors { top : parent.top left : parent.left Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -rf2e4eba6e85c5d36537be782926f23cc9dc01037 -r50e38888132835a21357dfadff7a9bb1ccfdd334 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision f2e4eba6e85c5d36537be782926f23cc9dc01037) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 50e38888132835a21357dfadff7a9bb1ccfdd334) @@ -57,24 +57,81 @@ || _treatmentUltrafiltrationItem .visible // Components MainMenu { id: _treatmentMenu - y : Variables.mainMenuHeight * -1 +// y : Variables.mainMenuHeight * -1 position : MainMenu.Position.Top hidden : true - titles : [ qsTr("Treatment") , qsTr("Trending") , qsTr("Settings") ] - visibleItems : [ true , false , false ] - spacing : 20 - leftPdding : 20 - rightPdding : 50 - partitionWidth : 100 // Todo Important : max width should be the width for all bottons - hasRightText : true - hasLogo : true + titles : [ qsTr("Treatment") , qsTr("Trending") , qsTr("Heparin") ] + visibleItems : [ true , true , true ] + spacing : Variables.defaultMargin + leftPdding : Variables.headerBarDateTimeWidth + Variables.columnSpacing // 200 + 60 + partitionWidth : 80 * titles.length// Todo Important : max width should be the width for all bottons + titlePixelSize : 32 + /* ----- TEST: Under the test code, for the plotting of the items ----- onCurrentIndexChanged: { console.debug(currentIndex) if (currentIndex == 1) push(_treatmentTrending) if (currentIndex == 0) pop() } */ + + Row { id: _headerButtonRow + width : 350 + height : parent.height + + spacing : Variables.defaultMargin + anchors { + right : parent.right + } + + TouchRect { id : _prescriptionButton + width : Variables.mainMenuHeight + height : Variables.mainMenuHeight + border.color: "transparent" + + Image { id : _prescriptionImage + anchors.centerIn: parent + height : Variables.mainTreatmentIconDiameter + width : Variables.mainTreatmentIconDiameter + fillMode: Image.PreserveAspectFit + source : "qrc:/images/iPrescription" + } + + onPressed: print("Prescription button pressed!") + } + + TouchRect { id : _settingsButton + width : Variables.mainMenuHeight + height : Variables.mainMenuHeight + border.color: "transparent" + + Image { id : _settingsImage + anchors.centerIn: parent + height : Variables.mainTreatmentIconDiameter + width : Variables.mainTreatmentIconDiameter + fillMode: Image.PreserveAspectFit + source : "qrc:/images/iSettings" + } + + onPressed: print("Settings button pressed!") + } + + TouchRect { id : _wifiButton + width : Variables.mainMenuHeight + height : Variables.mainMenuHeight + border.color: "transparent" + + Image { id : _wifiImage + anchors.centerIn: parent + height : Variables.mainTreatmentIconDiameter + width : Variables.mainTreatmentIconDiameter + fillMode: Image.PreserveAspectFit + source : "qrc:/images/iWifi" + } + + onPressed: print("Wifi button pressed!") + } + } } TreatmentBloodPrime { id: _treatmentBloodPrime }