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

RemoteIDIndicator.qml: Fix indicator on light palette #12451

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
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
6 changes: 2 additions & 4 deletions qgcimages.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,8 @@
<file alias="RidEmergencyBackground.svg">src/UI/toolbar/Images/RidEmergencyBackground.svg</file>
<file alias="RidFlagBackgroundGreen.svg">src/UI/toolbar/Images/RidFlagBackgroundGreen.svg</file>
<file alias="RidFlagBackgroundRed.svg">src/UI/toolbar/Images/RidFlagBackgroundRed.svg</file>
<file alias="RidIconGreen.svg">src/UI/toolbar/Images/RidIconGreen.svg</file>
<file alias="RidIconGrey.svg">src/UI/toolbar/Images/RidIconGrey.svg</file>
<file alias="RidIconRed.svg">src/UI/toolbar/Images/RidIconRed.svg</file>
<file alias="RidIconYellow.svg">src/UI/toolbar/Images/RidIconYellow.svg</file>
<file alias="RidIconMan.svg">src/UI/toolbar/Images/RidIconMan.svg</file>
<file alias="RidIconText.svg">src/UI/toolbar/Images/RidIconText.svg</file>
<file alias="RC.svg">src/UI/toolbar/Images/RC.svg</file>
<file alias="RCLoss.svg">src/AutoPilotPlugins/PX4/Images/RCLoss.svg</file>
<file alias="RCLossLight.svg">src/AutoPilotPlugins/PX4/Images/RCLossLight.svg</file>
Expand Down
9 changes: 0 additions & 9 deletions src/UI/toolbar/Images/RidIconGreen.svg

This file was deleted.

9 changes: 0 additions & 9 deletions src/UI/toolbar/Images/RidIconGrey.svg

This file was deleted.

26 changes: 26 additions & 0 deletions src/UI/toolbar/Images/RidIconMan.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions src/UI/toolbar/Images/RidIconRed.svg

This file was deleted.

23 changes: 23 additions & 0 deletions src/UI/toolbar/Images/RidIconText.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions src/UI/toolbar/Images/RidIconYellow.svg

This file was deleted.

26 changes: 18 additions & 8 deletions src/UI/toolbar/RemoteIDIndicator.qml
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ Item {
EU
}

function getRIDIcon() {
function getRidColor() {
switch (remoteIDState) {
case RemoteIDIndicator.RIDState.HEALTHY:
return "/qmlimages/RidIconGreen.svg"
return qgcPal.colorGreen
break
case RemoteIDIndicator.RIDState.WARNING:
return "/qmlimages/RidIconYellow.svg"
return qgcPal.colorYellow
break
case RemoteIDIndicator.RIDState.ERROR:
return "/qmlimages/RidIconRed.svg"
return qgcPal.colorRed
break
case RemoteIDIndicator.RIDState.UNAVAILABLE:
return "/qmlimages/RidIconGrey.svg"
return qgcPal.colorGrey
break
default:
return "/qmlimages/RidIconGrey.svg"
return qgcPal.colorGrey
}
}

Expand Down Expand Up @@ -96,14 +96,24 @@ Item {
}
}

Image {
QGCColoredImage {
id: remoteIDIcon
width: height
anchors.top: parent.top
anchors.bottom: parent.bottom
source: getRIDIcon()
source: "/qmlimages/RidIconMan.svg"
color: getRidColor()
fillMode: Image.PreserveAspectFit
sourceSize.height: height

QGCColoredImage {
width: height
anchors.fill: parent
sourceSize.height: height
source: "/qmlimages/RidIconText.svg"
fillMode: Image.PreserveAspectFit
color: qgcPal.text
}
}

MouseArea {
Expand Down
Loading