Skip to content

Commit

Permalink
Fix terrain chart colors
Browse files Browse the repository at this point in the history
Contribution Sponsor: Firestorm (launchfirestorm.com)
  • Loading branch information
gillamkid authored and DonLakeFlyer committed Sep 22, 2024
1 parent 9d841cd commit 27007c0
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/PlanView/TerrainStatus.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -204,4 +204,8 @@ Rectangle {
}
}
}

function applyOpacity(colorIn, opacity){
return Qt.rgba(colorIn.r, colorIn.g, colorIn.b, opacity)
}
}

0 comments on commit 27007c0

Please sign in to comment.