Commit adc519c7 authored by Jacob Dahl's avatar Jacob Dahl

Added pass/fail/pending text colors to the QGC palette which default to...

Added pass/fail/pending text colors to the QGC palette which default to standard text color. Added such that custom builds can override
parent 3a00fdad
......@@ -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();
......
......@@ -16,10 +16,6 @@ import QGroundControl.ScreenTools 1.0
/// A PreFlightCheckGroup manages a set of PreFlightCheckButtons as a single entity.
Column {
property string name
property string passedTextColor: "black"
property string failedTextColor: "black"
property string pendingTextColor: "black"
property bool passed: false
property bool failed: false
......@@ -52,7 +48,7 @@ Column {
anchors.left: parent.left
anchors.right: parent.right
text: name + (passed ? qsTr(" (passed)") : "")
color: failed ? failedTextColor : (passed ? passedTextColor : pendingTextColor)
color: failed ? qgcPal.statusFailedText : (passed ? qgcPal.statusPassedText : qgcPal.statusPendingText)
}
Column {
......
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