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

File path doesn't overflow

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