Index: sources/gui/qml/components/HeaderBar.qml =================================================================== diff -u -r89be2d248cac3f748b704cd62408cf8911991039 -r69c86c57349b7d4a6ba47a801ba27b1c470fade5 --- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 89be2d248cac3f748b704cd62408cf8911991039) +++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 69c86c57349b7d4a6ba47a801ba27b1c470fade5) @@ -25,10 +25,11 @@ MouseArea { id: _mouseArea anchors.fill : parent - // TODO: disable this later. this is only for diagnostic purpose. property real lastClickTime: 0 property int doubleClickThreshold: 500 // ms + // had to implement my own double click because the onDoubleClicked was not user friednly for touch. + // a 500 ms threshold between clicks has bee added onClicked : { const now = Date.now() if (now - _mouseArea.lastClickTime < _mouseArea.doubleClickThreshold) { @@ -131,8 +132,16 @@ titlePixelSize : 32 backgroundColor : Colors.transparent highlightHeight : 15 + model : _model isMainTreatment : true onHiddenChanged: { if (hidden) { index = 0 } } + + ListModel { id: _model + ListElement { text: qsTr("Treatment"); visible: true; screen: 0 } // MainMenu.Treatment + ListElement { text: qsTr("Trends"); visible: true; screen: 1 } // MainMenu.Trends + ListElement { text: qsTr("Heparin"); visible: true; screen: 2 } // MainMenu.Heparin + ListElement { text: qsTr("HDF"); visible: false; screen: 3 } // MainMenu.HDF + } } Row { id: _headerButtonRow