Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 -r11cf98a0aae3c01a7e7608b0c9f8a4c2112ca997 --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 11cf98a0aae3c01a7e7608b0c9f8a4c2112ca997) @@ -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,7 @@ 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: {