diff --git a/src/MissionEditor/MissionEditor.qml b/src/MissionEditor/MissionEditor.qml index efc0a33c37f2622690a294eecb79132f08540684..d4ff77ae1f5d26e0418b6d4cbd071b7cc59ee2ea 100644 --- a/src/MissionEditor/MissionEditor.qml +++ b/src/MissionEditor/MissionEditor.qml @@ -718,6 +718,7 @@ QGCView { z: QGroundControl.zOrderWidgets showAlternateIcon: [ false, false, _syncDropDownController.dirty, false, false, false, false ] rotateImage: [ false, false, _syncDropDownController.syncInProgress, false, false, false, false ] + animateImage: [ false, false, _syncDropDownController.dirty, false, false, false, false ] buttonEnabled: [ true, true, !_syncDropDownController.syncInProgress, true, true, true, true ] buttonVisible: [ true, true, true, true, true, _showZoom, _showZoom ] maxHeight: mapScale.y - toolStrip.y diff --git a/src/QmlControls/ToolStrip.qml b/src/QmlControls/ToolStrip.qml index 6edd257900ab3830b922f2e65618388855ae19c6..840cb2c83e931814fa50d42fdafb61d6b3802315 100644 --- a/src/QmlControls/ToolStrip.qml +++ b/src/QmlControls/ToolStrip.qml @@ -24,6 +24,7 @@ Rectangle { property alias model: repeater.model property var showAlternateIcon ///< List of bool values, one for each button in strip - true: show alternate icon, false: show normal icon property var rotateImage ///< List of bool values, one for each button in strip - true: animation rotation, false: static image + property var animateImage ///< List of bool values, one for each button in strip - true: animate image, false: static image property var buttonEnabled ///< List of bool values, one for each button in strip - true: button enabled, false: button disabled property var buttonVisible ///< List of bool values, one for each button in strip - true: button visible, false: button invisible property real maxHeight ///< Maximum height for control, determines whether text is hidden to make control shorter @@ -123,6 +124,7 @@ Rectangle { property var _alternateIconSource: modelData.alternateIconSource property var _source: (_root.showAlternateIcon && _root.showAlternateIcon[index]) ? _alternateIconSource : _iconSource property bool rotateImage: _root.rotateImage ? _root.rotateImage[index] : false + property bool animateImage: _root.animateImage ? _root.animateImage[index] : false onExclusiveGroupChanged: { if (exclusiveGroup) { @@ -139,6 +141,15 @@ Rectangle { } } + onAnimateImageChanged: { + if (animateImage) { + opacityAnimation.running = true + } else { + opacityAnimation.running = false + button.opacity = 1 + } + } + Item { width: 1 height: _buttonSpacing @@ -170,6 +181,14 @@ Rectangle { running: false } + NumberAnimation on opacity { + id: opacityAnimation + running: false + from: 0 + to: 1.0 + loops: Animation.Infinite + duration: 2000 + } } QGCMouseArea {