RemoteIDIndicator.qml: Fix indicator on light palette

This commit is contained in:
davidsastresas
2025-02-13 15:26:57 +01:00
committed by Don Gagne
parent a8ab437dab
commit 1ba4b6d5bd
8 changed files with 69 additions and 48 deletions
+2 -4
View File
@@ -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>
-9
View File
@@ -1,9 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 83.31 79.59">
<g data-name="Capa 2">
<g data-name="REMOTE ID">
<circle cx="33.45" cy="21.02" r="21.02" style="fill:#00c500"/>
<path d="M51.9 39.36a24.5 24.5 0 0 1-36.9 0C6 47.7 0 62 0 78.23h66.89c0-16.23-5.96-30.53-14.99-38.87" style="fill:#00c500"/>
<path d="M40.13 78.23V50.6h7.81v27.63ZM53.5 78.23V50.6h13.07a18 18 0 0 1 8 1.7A13 13 0 0 1 80 57.08a13.33 13.33 0 0 1 2 7.3 13.54 13.54 0 0 1-2 7.36 13 13 0 0 1-5.43 4.79 18 18 0 0 1-8 1.7ZM61.32 72h4.85a8.9 8.9 0 0 0 4.16-.91 6.53 6.53 0 0 0 2.74-2.62 8.06 8.06 0 0 0 1-4.08 7.84 7.84 0 0 0-1-4 6.56 6.56 0 0 0-2.74-2.58 8.9 8.9 0 0 0-4.16-.91h-4.85Z" style="fill:#fff;stroke:#f0f;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0;stroke-width:2.72174942493439px"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 858 B

-9
View File
@@ -1,9 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 83.31 79.59">
<g data-name="Capa 2">
<g data-name="REMOTE ID">
<circle cx="33.45" cy="21.02" r="21.02" style="fill:#606060"/>
<path d="M51.9 39.36a24.5 24.5 0 0 1-36.9 0C6 47.7 0 62 0 78.23h66.89c0-16.23-5.96-30.53-14.99-38.87" style="fill:#606060"/>
<path d="M40.13 78.23V50.6h7.81v27.63ZM53.5 78.23V50.6h13.07a18 18 0 0 1 8 1.7A13 13 0 0 1 80 57.08a13.33 13.33 0 0 1 2 7.3 13.54 13.54 0 0 1-2 7.36 13 13 0 0 1-5.43 4.79 18 18 0 0 1-8 1.7ZM61.32 72h4.85a8.9 8.9 0 0 0 4.16-.91 6.53 6.53 0 0 0 2.74-2.62 8.06 8.06 0 0 0 1-4.08 7.84 7.84 0 0 0-1-4 6.56 6.56 0 0 0-2.74-2.58 8.9 8.9 0 0 0-4.16-.91h-4.85Z" style="fill:#fff;stroke:#f0f;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0;stroke-width:2.72174942493439px"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 858 B

+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Capa_2" data-name="Capa 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72">
<defs>
<style>
.cls-1 {
fill: #fff;
}
.cls-2 {
fill: none;
}
</style>
</defs>
<g id="REMOTE_ID" data-name="REMOTE ID">
<g>
<g>
<ellipse class="cls-1" cx="30.17" cy="19.35" rx="18.96" ry="19.35"/>
<g>
<path class="cls-1" d="m54.83,64.79h2.94c.78,0,1.47-.1,2.1-.29-.47-3.76-1.27-7.36-2.38-10.71h-2.66v11Z"/>
<path class="cls-1" d="m44.9,72v-25.42c0-.81.65-1.47,1.44-1.47h7.33c-1.95-3.43-4.26-6.44-6.85-8.88-4.05,4.72-10.01,7.71-16.64,7.71s-12.59-2.99-16.64-7.71C5.38,43.9,0,57.06,0,72h32.83v-25.42c0-.81.65-1.47,1.44-1.47h7.05c.8,0,1.44.66,1.44,1.47v25.42h2.13Z"/>
</g>
</g>
<rect class="cls-2" x="0" width="72" height="72"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 898 B

-9
View File
@@ -1,9 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 83.31 79.59">
<g data-name="Capa 2">
<g data-name="REMOTE ID">
<circle cx="33.45" cy="21.02" r="21.02" style="fill:#db313e"/>
<path d="M51.9 39.36a24.5 24.5 0 0 1-36.9 0C6 47.7 0 62 0 78.23h66.89c0-16.23-5.96-30.53-14.99-38.87" style="fill:#db313e"/>
<path d="M40.13 78.23V50.6h7.81v27.63ZM53.5 78.23V50.6h13.07a18 18 0 0 1 8 1.7A13 13 0 0 1 80 57.08a13.33 13.33 0 0 1 2 7.3 13.54 13.54 0 0 1-2 7.36 13 13 0 0 1-5.43 4.79 18 18 0 0 1-8 1.7ZM61.32 72h4.85a8.9 8.9 0 0 0 4.16-.91 6.53 6.53 0 0 0 2.74-2.62 8.06 8.06 0 0 0 1-4.08 7.84 7.84 0 0 0-1-4 6.56 6.56 0 0 0-2.74-2.58 8.9 8.9 0 0 0-4.16-.91h-4.85Z" style="fill:#fff;stroke:#f0f;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0;stroke-width:2.72174942493439px"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 858 B

+23
View File
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Capa_2" data-name="Capa 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72">
<defs>
<style>
.cls-1 {
fill: #fff;
}
.cls-2 {
fill: none;
}
</style>
</defs>
<g id="REMOTE_ID" data-name="REMOTE ID">
<g>
<g>
<path class="cls-1" d="m34.27,72v-25.42h7.05v25.42h-7.05Z"/>
<path class="cls-1" d="m46.34,72v-25.42h11.78c2.73,0,5.14.52,7.22,1.56s3.72,2.51,4.89,4.39c1.17,1.89,1.76,4.13,1.76,6.72s-.59,4.87-1.76,6.77c-1.18,1.9-2.81,3.37-4.89,4.41-2.09,1.04-4.5,1.56-7.22,1.56h-11.78Zm7.05-5.74h4.38c1.45,0,2.7-.28,3.75-.83,1.06-.56,1.88-1.36,2.47-2.41.59-1.06.89-2.31.89-3.76s-.3-2.69-.89-3.72c-.59-1.03-1.42-1.82-2.47-2.38-1.05-.56-2.31-.84-3.75-.84h-4.38v13.94Z"/>
</g>
<rect class="cls-2" width="72" height="72"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 875 B

-9
View File
@@ -1,9 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 83.31 79.59">
<g data-name="Capa 2">
<g data-name="REMOTE ID">
<circle cx="33.45" cy="21.02" r="21.02" style="fill:#f2c300"/>
<path d="M51.9 39.36a24.5 24.5 0 0 1-36.9 0C6 47.7 0 62 0 78.23h66.89c0-16.23-5.96-30.53-14.99-38.87" style="fill:#f2c300"/>
<path d="M40.13 78.23V50.6h7.81v27.63ZM53.5 78.23V50.6h13.07a18 18 0 0 1 8 1.7A13 13 0 0 1 80 57.08a13.33 13.33 0 0 1 2 7.3 13.54 13.54 0 0 1-2 7.36 13 13 0 0 1-5.43 4.79 18 18 0 0 1-8 1.7ZM61.32 72h4.85a8.9 8.9 0 0 0 4.16-.91 6.53 6.53 0 0 0 2.74-2.62 8.06 8.06 0 0 0 1-4.08 7.84 7.84 0 0 0-1-4 6.56 6.56 0 0 0-2.74-2.58 8.9 8.9 0 0 0-4.16-.91h-4.85Z" style="fill:#fff;stroke:#f0f;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0;stroke-width:2.72174942493439px"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 858 B

+18 -8
View File
@@ -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
}
}
@@ -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 {