Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix terrain chart colors #11928

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}
}
Loading