Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -r69c86c57349b7d4a6ba47a801ba27b1c470fade5 -rd4b731494a05087a763afff95b91c675bb417347 --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 69c86c57349b7d4a6ba47a801ba27b1c470fade5) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision d4b731494a05087a763afff95b91c675bb417347) @@ -33,22 +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 statusColor : 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) } @@ -94,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 @@ -104,7 +95,7 @@ border.width: 0 pixelSize : titlePixelSize - Rectangle { id: _heparinStatus + Rectangle { id: _status anchors { left : parent.left leftMargin : Variables.defaultMargin * 2 @@ -115,8 +106,7 @@ height : 15 width : height radius : height - visible : _root.isMainTreatment && model.screen === MainMenu.Heparin - color : _root.statusColor + color : model.statusColor ?? Colors.transparent } onPressed: {