Browse Source

Show stock image as background when Waiting For Video (#10604)

Add background to make it easier to read


Update
QGC4.4
Don Gagne 2 years ago committed by GitHub
parent
commit
2bc8c6ee26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      qgcresources.qrc
  2. BIN
      resources/NoVideoBackground.jpg
  3. 17
      src/FlightDisplay/FlightDisplayViewVideo.qml

1
qgcresources.qrc

@ -31,6 +31,7 @@
<file alias="LockClosed.svg">resources/LockClosed.svg</file> <file alias="LockClosed.svg">resources/LockClosed.svg</file>
<file alias="LockOpen.svg">resources/LockOpen.svg</file> <file alias="LockOpen.svg">resources/LockOpen.svg</file>
<file alias="notile.png">resources/notile.png</file> <file alias="notile.png">resources/notile.png</file>
<file alias="NoVideoBackground.jpg">resources/NoVideoBackground.jpg</file>
<file alias="Pause.svg">resources/Pause.svg</file> <file alias="Pause.svg">resources/Pause.svg</file>
<file alias="pause-mission.svg">resources/pause-mission.svg</file> <file alias="pause-mission.svg">resources/pause-mission.svg</file>
<file alias="pencil.svg">resources/pencil.svg</file> <file alias="pencil.svg">resources/pencil.svg</file>

BIN
resources/NoVideoBackground.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 KiB

17
src/FlightDisplay/FlightDisplayViewVideo.qml

@ -38,12 +38,24 @@ Item {
property double _thermalHeightFactor: 0.85 //-- TODO property double _thermalHeightFactor: 0.85 //-- TODO
Rectangle { Image {
id: noVideo id: noVideo
anchors.fill: parent anchors.fill: parent
color: Qt.rgba(0,0,0,0.75) source: "/res/NoVideoBackground.jpg"
fillMode: Image.PreserveAspectCrop
visible: !(QGroundControl.videoManager.decoding) visible: !(QGroundControl.videoManager.decoding)
Rectangle {
anchors.centerIn: parent
width: noVideoLabel.contentWidth + ScreenTools.defaultFontPixelHeight
height: noVideoLabel.contentHeight + ScreenTools.defaultFontPixelHeight
radius: ScreenTools.defaultFontPixelWidth / 2
color: "black"
opacity: 0.5
}
QGCLabel { QGCLabel {
id: noVideoLabel
text: QGroundControl.settingsManager.videoSettings.streamEnabled.rawValue ? qsTr("WAITING FOR VIDEO") : qsTr("VIDEO DISABLED") text: QGroundControl.settingsManager.videoSettings.streamEnabled.rawValue ? qsTr("WAITING FOR VIDEO") : qsTr("VIDEO DISABLED")
font.family: ScreenTools.demiboldFontFamily font.family: ScreenTools.demiboldFontFamily
color: "white" color: "white"
@ -51,6 +63,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
} }
} }
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: "black" color: "black"

Loading…
Cancel
Save