Unverified Commit f65bf438 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8333 from dakejahl/pr-support_checklist_section_colored_text

Support for checklist status text color
parents 80cdb116 adc519c7
......@@ -77,6 +77,9 @@ void QGCPalette::_buildMap()
DECLARE_QGC_COLOR(alertText, "#000000", "#000000", "#000000", "#000000")
DECLARE_QGC_COLOR(missionItemEditor, "#585858", "#dbfef8", "#585858", "#585d83")
DECLARE_QGC_COLOR(hoverColor, "#585858", "#dbfef8", "#585858", "#585d83")
DECLARE_QGC_COLOR(statusFailedText, "#9d9d9d", "#000000", "#707070", "#ffffff")
DECLARE_QGC_COLOR(statusPassedText, "#9d9d9d", "#000000", "#707070", "#ffffff")
DECLARE_QGC_COLOR(statusPendingText, "#9d9d9d", "#000000", "#707070", "#ffffff")
// Colors are not affecting by theming
DECLARE_QGC_COLOR(mapWidgetBorderLight, "#ffffff", "#ffffff", "#ffffff", "#ffffff")
......
......@@ -115,6 +115,9 @@ public:
DEFINE_QGC_COLOR(alertText, setAlertText)
DEFINE_QGC_COLOR(missionItemEditor, setMissionItemEditor)
DEFINE_QGC_COLOR(hoverColor, setHoverColor)
DEFINE_QGC_COLOR(statusFailedText, setstatusFailedText)
DEFINE_QGC_COLOR(statusPassedText, setstatusPassedText)
DEFINE_QGC_COLOR(statusPendingText, setstatusPendingText)
QGCPalette(QObject* parent = nullptr);
~QGCPalette();
......
......@@ -32,6 +32,7 @@ QGCButton {
property bool telemetryFailure: false ///< true: telemetry check failing, false: telemetry check passing
property bool allowTelemetryFailureOverride: false ///< true: user can click past telemetry failure
property bool passed: _manualState === _statePassed && _telemetryState === _statePassed
property bool failed: _manualState === _stateFailed || _telemetryState === _stateFailed
property int _manualState: manualText === "" ? _statePassed : _statePending
property int _telemetryState: _statePassed
......
......@@ -17,6 +17,7 @@ import QGroundControl.ScreenTools 1.0
Column {
property string name
property bool passed: false
property bool failed: false
spacing: ScreenTools.defaultFontPixelHeight / 2
......@@ -47,6 +48,7 @@ Column {
anchors.left: parent.left
anchors.right: parent.right
text: name + (passed ? qsTr(" (passed)") : "")
color: failed ? qgcPal.statusFailedText : (passed ? qgcPal.statusPassedText : qgcPal.statusPendingText)
}
Column {
......@@ -58,9 +60,11 @@ Column {
for (var i=0; i<children.length; i++) {
if (!children[i].passed) {
passed = false
failed = children[i].failed
return
}
}
failed = false
passed = true
}
}
......
......@@ -10,6 +10,7 @@ FocusScope {
id: _root
height: column.height
property alias color: label.color
property alias text: label.text
property bool checked: true
property bool showSpacer: true
......
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