Commit 235b3d6f authored by Don Gagne's avatar Don Gagne

File path doesn't overflow

parent cb724342
......@@ -41,6 +41,9 @@ QGCView {
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 30
property Fact _mapProvider: QGroundControl.settingsManager.flightMapSettings.mapProvider
property Fact _mapType: QGroundControl.settingsManager.flightMapSettings.mapType
property real _panelWidth: _qgcView.width * _internalWidthRatio
readonly property real _internalWidthRatio: 0.8
readonly property string _requiresRestart: qsTr("(Requires Restart)")
......@@ -63,7 +66,7 @@ QGCView {
//-----------------------------------------------------------------
//-- Units
Item {
width: _qgcView.width * 0.8
width: _panelWidth
height: unitLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -76,7 +79,7 @@ QGCView {
}
Rectangle {
height: unitsCol.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _qgcView.width * 0.8
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -115,7 +118,7 @@ QGCView {
//-----------------------------------------------------------------
//-- Miscellaneous
Item {
width: _qgcView.width * 0.8
width: _panelWidth
height: miscLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -128,7 +131,7 @@ QGCView {
}
Rectangle {
height: miscCol.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _qgcView.width * 0.8
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -359,7 +362,7 @@ QGCView {
//-----------------------------------------------------------------
//-- Save path
Row {
RowLayout {
spacing: ScreenTools.defaultFontPixelWidth
visible: _savePath.visible && !ScreenTools.isMobile
......@@ -368,8 +371,10 @@ QGCView {
text: qsTr("File Save Path:")
}
QGCLabel {
anchors.baseline: savePathBrowse.baseline
text: _savePath.rawValue === "" ? qsTr("<not set>") : _savePath.value
anchors.baseline: savePathBrowse.baseline
Layout.maximumWidth: _panelWidth * 0.5
elide: Text.ElideMiddle
text: _savePath.rawValue === "" ? qsTr("<not set>") : _savePath.value
}
QGCButton {
id: savePathBrowse
......@@ -394,7 +399,7 @@ QGCView {
//-----------------------------------------------------------------
//-- RTK GPS
Item {
width: _qgcView.width * 0.8
width: _panelWidth
height: unitLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -407,7 +412,7 @@ QGCView {
}
Rectangle {
height: rtkGrid.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _qgcView.width * 0.8
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -438,7 +443,7 @@ QGCView {
//-----------------------------------------------------------------
//-- Autoconnect settings
Item {
width: _qgcView.width * 0.8
width: _panelWidth
height: autoConnectLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -451,7 +456,7 @@ QGCView {
}
Rectangle {
height: autoConnectCol.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _qgcView.width * 0.8
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -490,7 +495,7 @@ QGCView {
//-----------------------------------------------------------------
//-- Video Source
Item {
width: _qgcView.width * 0.8
width: _panelWidth
height: videoLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -503,7 +508,7 @@ QGCView {
}
Rectangle {
height: videoCol.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _qgcView.width * 0.8
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -605,7 +610,7 @@ QGCView {
//-----------------------------------------------------------------
//-- Video Source
Item {
width: _qgcView.width * 0.8
width: _panelWidth
height: videoRecLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -618,7 +623,7 @@ QGCView {
}
Rectangle {
height: videoRecCol.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _qgcView.width * 0.8
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -676,7 +681,7 @@ QGCView {
//-----------------------------------------------------------------
//-- Custom Brand Image
Item {
width: _qgcView.width * 0.8
width: _panelWidth
height: userBrandImageLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......@@ -689,7 +694,7 @@ QGCView {
}
Rectangle {
height: userBrandImageCol.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _qgcView.width * 0.8
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
......
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