Browse Source

Revert "TelemetryValuesBar: custom transparency by settings"

This reverts commit 671943640d.
QGC4.4
Don Gagne 4 years ago
parent
commit
73cb69ebb6
  1. 3
      src/FlightDisplay/TelemetryValuesBar.qml
  2. 9
      src/Settings/App.SettingsGroup.json
  3. 1
      src/Settings/AppSettings.cc
  4. 1
      src/Settings/AppSettings.h
  5. 49
      src/ui/preferences/GeneralSettings.qml

3
src/FlightDisplay/TelemetryValuesBar.qml

@ -20,10 +20,9 @@ Rectangle { @@ -20,10 +20,9 @@ Rectangle {
id: telemetryPanel
height: telemetryLayout.height + (_toolsMargin * 2)
width: telemetryLayout.width + (_toolsMargin * 2)
color: Qt.hsla(_baseBGColor.hslHue, _baseBGColor.hslSaturation, _baseBGColor.hslLightness, _telemetryPanelAlpha)
color: Qt.hsla(_baseBGColor.hslHue, _baseBGColor.hslSaturation, _baseBGColor.hslLightness, 0.5)
radius: ScreenTools.defaultFontPixelWidth / 2
property real _telemetryPanelAlpha: QGroundControl.settingsManager.appSettings.instrumentWidgetAlpha.value
property color _baseBGColor: qgcPal.window
DeadMouseArea { anchors.fill: parent }

9
src/Settings/App.SettingsGroup.json

@ -316,15 +316,6 @@ @@ -316,15 +316,6 @@
"shortDesc": "Use COMPONENT_INFORMATION query (beta)",
"type": "bool",
"default": false
},
{
"name": "instrumentWidgetAlpha",
"shortDesc": "Intrument widget opacity",
"type": "float",
"units": "pt",
"min": 0,
"max": 1,
"default": 0.5
}
]
}

1
src/Settings/AppSettings.cc

@ -137,7 +137,6 @@ DECLARE_SETTINGSFACT(AppSettings, firstRunPromptIdsShown) @@ -137,7 +137,6 @@ DECLARE_SETTINGSFACT(AppSettings, firstRunPromptIdsShown)
DECLARE_SETTINGSFACT(AppSettings, forwardMavlink)
DECLARE_SETTINGSFACT(AppSettings, forwardMavlinkHostName)
DECLARE_SETTINGSFACT(AppSettings, useComponentInformationQuery)
DECLARE_SETTINGSFACT(AppSettings, instrumentWidgetAlpha)
DECLARE_SETTINGSFACT_NO_FUNC(AppSettings, indoorPalette)
{

1
src/Settings/AppSettings.h

@ -64,7 +64,6 @@ public: @@ -64,7 +64,6 @@ public:
DEFINE_SETTINGFACT(forwardMavlink)
DEFINE_SETTINGFACT(forwardMavlinkHostName)
DEFINE_SETTINGFACT(useComponentInformationQuery)
DEFINE_SETTINGFACT(instrumentWidgetAlpha)
// Although this is a global setting it only affects ArduPilot vehicle since PX4 automatically starts the stream from the vehicle side
DEFINE_SETTINGFACT(apmStartMavlinkStreams)

49
src/ui/preferences/GeneralSettings.qml

@ -32,7 +32,6 @@ Rectangle { @@ -32,7 +32,6 @@ Rectangle {
property Fact _savePath: QGroundControl.settingsManager.appSettings.savePath
property Fact _appFontPointSize: QGroundControl.settingsManager.appSettings.appFontPointSize
property Fact _instrumentWidetAlpha: QGroundControl.settingsManager.appSettings.instrumentWidgetAlpha
property Fact _userBrandImageIndoor: QGroundControl.settingsManager.brandImageSettings.userBrandImageIndoor
property Fact _userBrandImageOutdoor: QGroundControl.settingsManager.brandImageSettings.userBrandImageOutdoor
property Fact _virtualJoystick: QGroundControl.settingsManager.appSettings.virtualJoystick
@ -584,54 +583,6 @@ Rectangle { @@ -584,54 +583,6 @@ Rectangle {
}
}
}
QGCLabel {
text: qsTr("Telemetry widget opacity")
visible: _instrumentWidetAlpha.visible
Layout.alignment: Qt.AlignVCenter
}
Item {
width: _comboFieldWidth
height: instrumentWidgetEdit.height * 1.5
visible: _instrumentWidetAlpha.visible
Layout.alignment: Qt.AlignVCenter
Row {
spacing: ScreenTools.defaultFontPixelWidth
anchors.verticalCenter: parent.verticalCenter
QGCButton {
width: height
height: instrumentWidgetEdit.height * 1.5
text: "-"
anchors.verticalCenter: parent.verticalCenter
onClicked: {
if (_instrumentWidetAlpha.value > _instrumentWidetAlpha.min) {
_instrumentWidetAlpha.value = _instrumentWidetAlpha.value - 0.05
}
}
}
QGCLabel {
id: instrumentWidgetEdit
width: ScreenTools.defaultFontPixelWidth * 6
text: (QGroundControl.settingsManager.appSettings.instrumentWidgetAlpha.value * 100).toFixed(0) + "%"
horizontalAlignment: Text.AlignHCenter
anchors.verticalCenter: parent.verticalCenter
}
Text {
}
QGCButton {
width: height
height: instrumentWidgetEdit.height * 1.5
text: "+"
anchors.verticalCenter: parent.verticalCenter
onClicked: {
if (_instrumentWidetAlpha.value < _instrumentWidetAlpha.max) {
_instrumentWidetAlpha.value = _instrumentWidetAlpha.value + 0.05
}
}
}
}
}
}
}

Loading…
Cancel
Save