Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -r45ce5cd058a8d0239d486e0ab4b057731f7dba76 -rdb77d641586bcf38af1b931296519307d5901281 --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 45ce5cd058a8d0239d486e0ab4b057731f7dba76) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision db77d641586bcf38af1b931296519307d5901281) @@ -33,23 +33,13 @@ property int titlePixelSize : 40 property color backgroundColor : Colors.backgroundMainMenu property int highlightHeight : 10 - property bool isMainTreatment : false - readonly property int currentScreen : isMainTreatment ? _model.get(index).screen : 0 - property color heparinStatusColor : Colors.transparent - property color hdfStatusColor : Colors.transparent + readonly property int currentScreen : model.get(index).screen ?? 0 width : parent.width height : Variables.mainMenuHeight color : _root.backgroundColor clip : true - enum TreatmentScreen { - Treatment = 0, - Trends = 1, - Heparin = 2, - HDF = 3 - } - gradient: Gradient { GradientStop { position: 0.2; color: Qt.lighter(Colors.backgroundMain, 1.2) } GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.2) } @@ -95,7 +85,7 @@ objectName : "delegateControl" width : ListView.view.count ? _delegateControl.visible ? ListView.view.width / ListView.view.count : 0 : 0 height : ListView.view.height - visible : model.screen === MainMenu.Heparin ? vSettings.heparinSyringePump : model.visible + visible : model.visible TouchRect { id : _touchRect objectName: "_touchRect" + index @@ -116,10 +106,8 @@ height : 15 width : height radius : height - visible : _root.isMainTreatment && ( model.screen === MainMenu.Heparin || - model.screen === MainMenu.HDF ) - color : model.screen === MainMenu.Heparin ? _root.heparinStatusColor : - model.screen === MainMenu.HDF ? _root.hdfStatusColor : Colors.transparent + color : model.statusColor ?? Colors.transparent + } onPressed: {