Index: sources/gui/qml/components/HeaderBar.qml =================================================================== diff -u -r51cb7f2c575286515aa7b715e032514772c1ce1f -rc843f1d6a805119ecadfa2c24f309f77e7637830 --- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 51cb7f2c575286515aa7b715e032514772c1ce1f) +++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision c843f1d6a805119ecadfa2c24f309f77e7637830) @@ -17,7 +17,7 @@ GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.2) } } - function vitalsRecorded() { _pulseAnimation.start() } + function vitalsRecorded() { _vitalsButton.pulseAnimation.start() } MouseArea { id: _mouseArea anchors.fill : parent @@ -112,30 +112,10 @@ rightMargin : _headerButtonRow.spacing } - IconButton { id : _vitalsButton - iconSize : Variables.headerIconDiameter - iconImageSource : "qrc:/images/iVitals" + VitalsButton { id : _vitalsButton extraSpace : _headerButtonRow.spacing onPressed : _treatmentAdjustmentVitals.open() - - SequentialAnimation { id: _pulseAnimation - loops : 2 - running : false - alwaysRunToEnd : true - onStarted : _vitalsButton.iconImageSource = "qrc:/images/iVitalsRed" - onStopped : _vitalsButton.iconImageSource = "qrc:/images/iVitals" - onFinished : { _vitalsButton.iconImageSource = "qrc:/images/iVitals"; _vitalsButton.opacity = 1; } - ParallelAnimation { id: _pulseOut - NumberAnimation { target: _vitalsButton; property: "opacity"; from: 0.3; to: 1; duration: 350; } // pulse up - NumberAnimation { target: _vitalsButton; property: "scale"; to: 1.14; duration: 350; easing.type: Easing.OutCubic } // beat grow - } - - ParallelAnimation { id: _pulseDown - NumberAnimation { target: _vitalsButton; property: "opacity"; from: 1; to: 0.3; duration: 350; } // pulse down - NumberAnimation { target: _vitalsButton; property: "scale"; to: 1.0; duration: 350; easing.type: Easing.InCubic } // beat shrink - } - } } IconButton { id : _prescriptionButton