From 27007c0900424f0f111ef544038472e72b4b3b51 Mon Sep 17 00:00:00 2001 From: Sam Gillam Date: Sun, 22 Sep 2024 00:11:31 -0400 Subject: [PATCH] Fix terrain chart colors Contribution Sponsor: Firestorm (launchfirestorm.com) --- src/PlanView/TerrainStatus.qml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/PlanView/TerrainStatus.qml b/src/PlanView/TerrainStatus.qml index dbd84a31734..5f8eb843441 100644 --- a/src/PlanView/TerrainStatus.qml +++ b/src/PlanView/TerrainStatus.qml @@ -79,9 +79,9 @@ Rectangle { lineVisible: true labelsFont.family: ScreenTools.fixedFontFamily labelsFont.pointSize: ScreenTools.smallFontPointSize - labelsColor: "white" + labelsColor: qgcPal.text tickCount: 5 - gridLineColor: "#44FFFFFF" + gridLineColor: applyOpacity(qgcPal.text, 0.25) } ValueAxis { @@ -91,9 +91,9 @@ Rectangle { lineVisible: true labelsFont.family: ScreenTools.fixedFontFamily labelsFont.pointSize: ScreenTools.smallFontPointSize - labelsColor: "white" + labelsColor: qgcPal.text tickCount: 4 - gridLineColor: "#44FFFFFF" + gridLineColor: applyOpacity(qgcPal.text, 0.25) } LineSeries { @@ -127,7 +127,7 @@ Rectangle { id: simpleItem height: terrainProfile.height width: 1 - color: "white" + color: qgcPal.text x: (object.distanceFromStart * terrainProfile.pixelsPerMeter) visible: object.isSimpleItem || object.isSingleItem @@ -146,7 +146,7 @@ Rectangle { id: complexItemEntry height: terrainProfile.height width: 1 - color: "white" + color: qgcPal.text x: (object.distanceFromStart * terrainProfile.pixelsPerMeter) visible: complexItem.visible @@ -164,7 +164,7 @@ Rectangle { id: complexItemExit height: terrainProfile.height width: 1 - color: "white" + color: qgcPal.text x: ((object.distanceFromStart + object.complexDistance) * terrainProfile.pixelsPerMeter) visible: complexItem.visible @@ -204,4 +204,8 @@ Rectangle { } } } + + function applyOpacity(colorIn, opacity){ + return Qt.rgba(colorIn.r, colorIn.g, colorIn.b, opacity) + } }