From 075175f239f4ddb0bbe42a147e39ea7583c55aa4 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 7 Jul 2016 19:56:17 -0700 Subject: [PATCH] Remove fading help text --- src/QmlControls/QGCToolBarButton.qml | 57 ++-------------------------- src/ui/toolbar/MainToolBar.qml | 4 -- 2 files changed, 3 insertions(+), 58 deletions(-) diff --git a/src/QmlControls/QGCToolBarButton.qml b/src/QmlControls/QGCToolBarButton.qml index b78731d3b..106267f33 100644 --- a/src/QmlControls/QGCToolBarButton.qml +++ b/src/QmlControls/QGCToolBarButton.qml @@ -20,18 +20,14 @@ Item { state: "HelpShown" clip: true - property alias text: helpText.text property alias source: icon.source property bool checked: false property bool logo: false property ExclusiveGroup exclusiveGroup: null - signal clicked() - readonly property real _topBottomMargins: ScreenTools.defaultFontPixelHeight / 2 - property real _helpTextBottomMargin: 0 - property real _imageBottomMargin: 0 + signal clicked() onExclusiveGroupChanged: { if (exclusiveGroup) { @@ -41,43 +37,6 @@ Item { QGCPalette { id: qgcPal } - states: [ - State { - name: "HelpShown" - }, - State { - name: "HelpHidden" - PropertyChanges { target: imageAnimation; running: true } - PropertyChanges { target: helpTextAnimation; running: true } - } - ] - - PropertyAnimation { - id: imageAnimation - target: _root - property: "_imageBottomMargin" - duration: 1000 - easing.type: Easing.InOutQuad - to: _topBottomMargins - from: 0 - } - - PropertyAnimation { - id: helpTextAnimation - target: _root - property: "_helpTextBottomMargin" - duration: 1000 - easing.type: Easing.InOutQuad - to: -helpText.height - from: 0 - } - - Timer { - interval: 10000 - running: true - onTriggered: _root.state = "HelpHidden" - } - Rectangle { anchors.fill: parent visible: logo @@ -90,8 +49,8 @@ Item { anchors.right: parent.right anchors.topMargin: _topBottomMargins anchors.top: parent.top - anchors.bottomMargin: _imageBottomMargin - anchors.bottom: helpText.top + anchors.bottomMargin: _topBottomMargins + anchors.bottom: parent.bottom sourceSize.height: parent.height fillMode: Image.PreserveAspectFit color: logo ? "white" : (checked ? qgcPal.buttonHighlight : qgcPal.buttonText) @@ -106,16 +65,6 @@ Item { visible: checked } - QGCLabel { - id: helpText - anchors.left: parent.left - anchors.right: parent.right - anchors.bottomMargin: _helpTextBottomMargin - anchors.bottom: parent.bottom - horizontalAlignment: Text.AlignHCenter - color: logo ? "white" : qgcPal.buttonText - } - MouseArea { anchors.fill: parent onClicked: { diff --git a/src/ui/toolbar/MainToolBar.qml b/src/ui/toolbar/MainToolBar.qml index 652a97b2c..af7e642e7 100644 --- a/src/ui/toolbar/MainToolBar.qml +++ b/src/ui/toolbar/MainToolBar.qml @@ -332,7 +332,6 @@ Rectangle { exclusiveGroup: mainActionGroup source: "/res/QGCLogoWhite" logo: true - text: "Settings" onClicked: toolBar.showPreferences() } @@ -343,7 +342,6 @@ Rectangle { anchors.bottom: parent.bottom exclusiveGroup: mainActionGroup source: "/qmlimages/Gears.svg" - text: "Setup" onClicked: toolBar.showSetupView() } @@ -354,7 +352,6 @@ Rectangle { anchors.bottom: parent.bottom exclusiveGroup: mainActionGroup source: "/qmlimages/Plan.svg" - text: "Plan" onClicked: toolBar.showPlanView() } @@ -365,7 +362,6 @@ Rectangle { anchors.bottom: parent.bottom exclusiveGroup: mainActionGroup source: "/qmlimages/PaperPlane.svg" - text: "Fly" onClicked: toolBar.showFlyView() } } -- 2.22.0