From 874b14f526813eae25cacf65d8c2b10b53582fcb Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Mon, 2 Sep 2019 13:56:30 -0700 Subject: [PATCH] Hide sequence numbers --- src/PlanView/MissionItemEditor.qml | 32 +++++++++++++++++------ src/QmlControls/MissionItemIndexLabel.qml | 2 +- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/PlanView/MissionItemEditor.qml b/src/PlanView/MissionItemEditor.qml index 8dd718d4a0..baeb59f706 100644 --- a/src/PlanView/MissionItemEditor.qml +++ b/src/PlanView/MissionItemEditor.qml @@ -70,6 +70,8 @@ Rectangle { } } + /* + Trying no sequence numbers in ui QGCLabel { id: label anchors.verticalCenter: commandPicker.verticalCenter @@ -77,7 +79,7 @@ Rectangle { anchors.left: parent.left text: missionItem.homePosition ? "P" : missionItem.sequenceNumber color: _outerTextColor - } + }*/ QGCColoredImage { id: hamburger @@ -172,15 +174,28 @@ Rectangle { checked = missionItem.rawEdit } } + + QGCMenuItem { + text: qsTr("Item #%1").arg(missionItem.sequenceNumber) + enabled: false + } } } QGCButton { id: commandPicker anchors.topMargin: _margin / 2 - anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2 anchors.rightMargin: ScreenTools.defaultFontPixelWidth + + anchors.leftMargin: _margin + anchors.left: parent.left + + /* + Trying no sequence numbers in ui + anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2 anchors.left: label.right + */ + anchors.top: parent.top visible: !commandLabel.visible text: missionItem.commandName @@ -197,12 +212,13 @@ Rectangle { } QGCLabel { - id: commandLabel - anchors.fill: commandPicker - visible: !missionItem.isCurrentItem || !missionItem.isSimpleItem || _waypointsOnlyMode - verticalAlignment: Text.AlignVCenter - text: missionItem.commandName - color: _outerTextColor + id: commandLabel + anchors.fill: commandPicker + visible: !missionItem.isCurrentItem || !missionItem.isSimpleItem || _waypointsOnlyMode + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + text: missionItem.commandName + color: _outerTextColor } Loader { diff --git a/src/QmlControls/MissionItemIndexLabel.qml b/src/QmlControls/MissionItemIndexLabel.qml index 18ea19c5aa..c954fb6e8e 100644 --- a/src/QmlControls/MissionItemIndexLabel.qml +++ b/src/QmlControls/MissionItemIndexLabel.qml @@ -35,7 +35,7 @@ Canvas { property real _labelMargin: 2 property real _labelRadius: _indicatorRadius + _labelMargin property string _label: label.length > 1 ? label : "" - property string _index: index === 0 || index === -1 ? label.charAt(0) : index + property string _index: index === 0 || index === -1 ? label.charAt(0) : ""/*index*/ onColorChanged: requestPaint() onShowGimbalYawChanged: requestPaint() -- GitLab