Commit fa793fe4 authored by Stefan Dunca's avatar Stefan Dunca Committed by Gus Grubba

New toolstrip based on QGCHoverButton

parent a08427a3
......@@ -561,16 +561,16 @@ Item {
ToolStrip {
visible: (activeVehicle ? activeVehicle.guidedModeSupported : true) && !QGroundControl.videoManager.fullScreen
id: toolStrip
anchors.leftMargin: isInstrumentRight() ? ScreenTools.defaultFontPixelWidth : undefined
anchors.leftMargin: isInstrumentRight() ? ScreenTools.defaultFontPixelWidth * 2 : undefined
anchors.left: isInstrumentRight() ? _mapAndVideo.left : undefined
anchors.rightMargin:isInstrumentRight() ? undefined : ScreenTools.defaultFontPixelWidth
anchors.right: isInstrumentRight() ? undefined : _mapAndVideo.right
anchors.topMargin: ScreenTools.toolbarHeight + (_margins * 2)
anchors.topMargin: ScreenTools.toolbarHeight + anchors.leftMargin
anchors.top: _mapAndVideo.top
z: _mapAndVideo.z + 4
title: qsTr("Fly")
maxHeight: (_flightVideo.visible ? _flightVideo.y : parent.height) - toolStrip.y
buttonVisible: [_useChecklist, _guidedController.showTakeoff || !_guidedController.showLand, _guidedController.showLand && !_guidedController.showTakeoff, true, true, true ]
buttonVisible: [_useChecklist, _guidedController.showTakeoff || !_guidedController.showLand, _guidedController.showLand && !_guidedController.showTakeoff, true, _guidedController.showPause, !_guidedController.showPause ]
buttonEnabled: [_useChecklist && activeVehicle, _guidedController.showTakeoff, _guidedController.showLand, _guidedController.showRTL, _guidedController.showPause, _anyActionAvailable ]
property bool _anyActionAvailable: _guidedController.showStartMission || _guidedController.showResumeMission || _guidedController.showChangeAlt || _guidedController.showLandAbort
......
......@@ -286,7 +286,7 @@ Item {
var sequenceNumber = _missionController.insertROIMissionItem(coordinate, index)
_missionController.setCurrentPlanViewIndex(sequenceNumber, true)
_addROIOnClick = false
toolStrip.uncheckAll()
toolStrip.lastClickedButton.checked = false
}
property int _moveDialogMissionItemIndex
......@@ -533,15 +533,16 @@ Item {
border.width: object.lineWidth
}
}
}
//-----------------------------------------------------------
// Left tool strip
ToolStrip {
id: toolStrip
anchors.leftMargin: ScreenTools.defaultFontPixelWidth
anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2
anchors.left: parent.left
anchors.topMargin: _toolButtonTopMargin
anchors.topMargin: _toolButtonTopMargin + anchors.leftMargin
anchors.top: parent.top
color: qgcPal.window
title: qsTr("Plan")
z: QGroundControl.zOrderWidgets
showAlternateIcon: [ _planMasterController.dirty, false, false, false, false, false, false ]
rotateImage: [ _planMasterController.syncInProgress, false, false, false, false, false, false ]
......@@ -549,7 +550,6 @@ Item {
buttonEnabled: [ !_planMasterController.syncInProgress, true, true, true, true, true, true ]
buttonVisible: [ true, true, _waypointsOnlyMode, true, true, _showZoom, _showZoom ]
maxHeight: mapScale.y - toolStrip.y
property bool _showZoom: !ScreenTools.isMobile
model: [
......@@ -613,7 +613,6 @@ Item {
}
}
}
}
//-----------------------------------------------------------
// Right pane for mission editing controls
......
......@@ -63,7 +63,7 @@ Item {
if (visible) {
visible = false
_dropDownComponent = undefined
toolStrip.uncheckAll()
toolStrip.lastClickedButton.checked = false
}
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment