Index: sources/gui/qml/dialogs/AlarmDialog.qml =================================================================== diff -u -rc2f474ff07c98aa350c445a2474976a3cf985f40 -rbecdb453874007323459a9afe9fe581b6c158902 --- sources/gui/qml/dialogs/AlarmDialog.qml (.../AlarmDialog.qml) (revision c2f474ff07c98aa350c445a2474976a3cf985f40) +++ sources/gui/qml/dialogs/AlarmDialog.qml (.../AlarmDialog.qml) (revision becdb453874007323459a9afe9fe581b6c158902) @@ -1,6 +1,6 @@ // Qt import QtQuick 2.12 -import QtGraphicalEffects 1.12 +// import QtGraphicalEffects 1.12 /* Qt6 Port: replace the above import with the following one: import QtQuick.Effects */ @@ -39,7 +39,6 @@ color : _colorMode.modeBackgroundDialogColor radius : Variables.alarmDialogRadius - signal muteClicked() signal minimizeClicked() signal listClicked() @@ -50,6 +49,10 @@ signal endClicked() signal okClicked() + function updateImage () { + _root.figureImageSource = _listView.model.get(_listView.currentIndex).image ?? "" + } + Rectangle { id: _titleBar anchors.top: parent.top height : Variables.alarmDialogHeaderHeight + _root.headerOverlap @@ -60,7 +63,7 @@ // TODO: disable doubleClicked later. this is only for diagnostic purpose when alarm dialog covers the entire screen. MouseArea { id: _minimizeArea anchors.fill : parent - onDoubleClicked : { if ( ! _root.minVisible ) _diagnosticsDialog.open() } + onDoubleClicked : { /*if ( ! _root.minVisible ) _diagnosticsDialog.open()*/ } } Text { id: _title @@ -134,7 +137,10 @@ interactive : false clip : true + onCurrentIndexChanged: _root.updateImage() + delegate: Item { id: _delegateControl + width : _listView.width height : Variables.instructionHeight clip : true @@ -152,21 +158,21 @@ Text { id: _stepNumberRect anchors.centerIn: parent text : index + 1 - color : vSettings.darkMode ? Colors.offWhite : _delegateControl.ListView.isCurrentItem ? _colorMode.modeBackgroundColor : _colorMode.modeButtonColor - font.pixelSize : 20 + color : vSettings.darkMode ? Colors.offWhite : _delegateControl.ListView.isCurrentItem ? _colorMode.modeBackgroundColor : _colorMode.modeButtonColor + font.pixelSize : 28 font.weight : Font.Medium } - layer.enabled : true - layer.effect : DropShadow { id: _dropShadow - horizontalOffset: 0 - verticalOffset : 3 - radius : 3.0 - samples : 7 - color : "#50000000" - source : _stepRect - anchors.fill : _stepRect - } + // layer.enabled : true + // layer.effect : DropShadow { id: _dropShadow + // horizontalOffset: 0 + // verticalOffset : 3 + // radius : 3.0 + // samples : 7 + // color : "#50000000" + // source : _stepRect + // anchors.fill : _stepRect + // } /* Qt6 Port: replace the above DropShadow with the following RectangularShadow: layer.effect : RectangularShadow { id: _dropShadow radius : 3.0 @@ -187,7 +193,7 @@ font.pixelSize : Fonts.fontPixelInstructionStep font.weight : _delegateControl.ListView.isCurrentItem ? Font.DemiBold : Font.Normal color : _delegateControl.ListView.isCurrentItem ? _colorMode.modeSelctedColor : _colorMode.modeTextColor - text : model.instruction + text : model.instruction.join(" ") wrapMode : Text.WordWrap } @@ -196,7 +202,6 @@ onClicked: { if (_listView.currentIndex !== index) { _listView.currentIndex = index - _root.figureImageSource = model.image } } } @@ -205,7 +210,7 @@ Image { id: _figureImage anchors.right : parent.right - anchors.verticalCenter: parent.verticalCenter + anchors.bottom : parent.bottom } } @@ -290,64 +295,69 @@ onPressed : resumeClicked() text.text : qsTr("Resume") width : _buttonGroup.buttonsWidth - isDefault : vSettings.darkMode + isDefault : true backgroundColor: Colors.transparent fgColor : isPressed ? Colors.offWhite : _colorMode.modeAlarmButtonPressedColor selectColor : Qt.darker(borderColor, 1.15) pixelSize : Fonts.fontPixelNotification borderColor : _colorMode.modeAlarmButtonColor + textFont.weight: Font.Medium } TouchRect { id : _temporaryBreak visible : temporaryBreakVisible onPressed : temporaryBreakClicked() text.text : qsTr("Temporary Break") width : _buttonGroup.buttonsWidth - isDefault : vSettings.darkMode + isDefault : true backgroundColor: Colors.transparent fgColor : isPressed ? Colors.offWhite : _colorMode.modeAlarmButtonPressedColor selectColor : Qt.darker(borderColor, 1.15) pixelSize : Fonts.fontPixelNotification borderColor : _colorMode.modeAlarmButtonColor + textFont.weight: Font.Medium } TouchRect { id : _rinsebackTouchRect visible : rinsebackVisible onPressed : rinsebackClicked() text.text : qsTr("Return Blood & End Treatment") width : _buttonGroup.buttonsWidth - isDefault : vSettings.darkMode + isDefault : true backgroundColor: Colors.transparent fgColor : isPressed ? Colors.offWhite : _colorMode.modeAlarmButtonPressedColor selectColor : Qt.darker(borderColor, 1.15) pixelSize : Fonts.fontPixelNotification borderColor : _colorMode.modeAlarmButtonColor + textFont.weight: Font.Medium } TouchRect { id : _endTouchRect visible : endVisible onPressed : endClicked() text.text : qsTr("End Treatment Only") width : _buttonGroup.buttonsWidth - isDefault : vSettings.darkMode + isDefault : true backgroundColor: Colors.transparent fgColor : isPressed ? Colors.offWhite : _colorMode.modeAlarmButtonPressedColor selectColor : Qt.darker(borderColor, 1.15) pixelSize : Fonts.fontPixelNotification borderColor : _colorMode.modeAlarmButtonColor + textFont.weight: Font.Medium } TouchRect { id : _okTouchRect visible : okVisible onPressed : okClicked() text.text : qsTr("OK") width : _buttonGroup.buttonsWidth - isDefault : vSettings.darkMode + isDefault : true backgroundColor: Colors.transparent fgColor : isPressed ? Colors.offWhite : _colorMode.modeAlarmButtonPressedColor selectColor : Qt.darker(borderColor, 1.15) pixelSize : Fonts.fontPixelNotification borderColor : _colorMode.modeAlarmButtonColor + textFont.weight: Font.Medium } }