Browse Source

Fixed instrument widget size for mobile devices

Clarify the title of the "Video Stream" panel (instead of just "Video")
QGC4.4
Gus Grubba 8 years ago
parent
commit
c47eb0097c
  1. 2
      src/FlightDisplay/FlightDisplayViewWidgets.qml
  2. 2
      src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
  3. 2
      src/api/QGCCorePlugin.cc

2
src/FlightDisplay/FlightDisplayViewWidgets.qml

@ -40,7 +40,7 @@ Item {
function getPreferredInstrumentWidth() { function getPreferredInstrumentWidth() {
if(ScreenTools.isMobile) { if(ScreenTools.isMobile) {
return ScreenTools.isTinyScreen ? mainWindow.width * 0.2 : mainWindow.width * 0.15 return mainWindow.width * 0.25
} }
return ScreenTools.defaultFontPixelWidth * 30 return ScreenTools.defaultFontPixelWidth * 30
} }

2
src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml

@ -20,7 +20,7 @@ import QGroundControl.Palette 1.0
/// Instrument panel shown when virtual thumbsticks are visible /// Instrument panel shown when virtual thumbsticks are visible
Rectangle { Rectangle {
id: root id: root
width: ScreenTools.isTinyScreen ? getPreferredInstrumentWidth() * 1.5 : getPreferredInstrumentWidth() width: getPreferredInstrumentWidth()
height: _outerRadius * 2 height: _outerRadius * 2
radius: _outerRadius radius: _outerRadius
color: qgcPal.window color: qgcPal.window

2
src/api/QGCCorePlugin.cc

@ -153,7 +153,7 @@ QVariantList& QGCCorePlugin::instrumentPages(void)
_p->valuesPageWidgetInfo = new QmlComponentInfo(tr("Values"), QUrl::fromUserInput("qrc:/qml/ValuePageWidget.qml")); _p->valuesPageWidgetInfo = new QmlComponentInfo(tr("Values"), QUrl::fromUserInput("qrc:/qml/ValuePageWidget.qml"));
_p->cameraPageWidgetInfo = new QmlComponentInfo(tr("Camera"), QUrl::fromUserInput("qrc:/qml/CameraPageWidget.qml")); _p->cameraPageWidgetInfo = new QmlComponentInfo(tr("Camera"), QUrl::fromUserInput("qrc:/qml/CameraPageWidget.qml"));
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
_p->videoPageWidgetInfo = new QmlComponentInfo(tr("Video"), QUrl::fromUserInput("qrc:/qml/VideoPageWidget.qml")); _p->videoPageWidgetInfo = new QmlComponentInfo(tr("Video Stream"), QUrl::fromUserInput("qrc:/qml/VideoPageWidget.qml"));
#endif #endif
_p->healthPageWidgetInfo = new QmlComponentInfo(tr("Health"), QUrl::fromUserInput("qrc:/qml/HealthPageWidget.qml")); _p->healthPageWidgetInfo = new QmlComponentInfo(tr("Health"), QUrl::fromUserInput("qrc:/qml/HealthPageWidget.qml"));
_p->vibrationPageWidgetInfo = new QmlComponentInfo(tr("Vibration"), QUrl::fromUserInput("qrc:/qml/VibrationPageWidget.qml")); _p->vibrationPageWidgetInfo = new QmlComponentInfo(tr("Vibration"), QUrl::fromUserInput("qrc:/qml/VibrationPageWidget.qml"));

Loading…
Cancel
Save