Add battery health to battery popup (#2355)

This commit is contained in:
end-4
2025-11-06 21:15:04 +01:00
committed by GitHub
2 changed files with 43 additions and 0 deletions
@@ -84,6 +84,30 @@ StyledPopup {
}
}
RowLayout {
spacing: 5
visible: Battery.health > 0
Layout.fillWidth: true
MaterialSymbol {
text: "heart_check"
color: Appearance.colors.colOnSurfaceVariant
iconSize: Appearance.font.pixelSize.large
}
StyledText {
text: Translation.tr("Health:")
color: Appearance.colors.colOnSurfaceVariant
}
StyledText {
Layout.fillWidth: true
horizontalAlignment: Text.AlignRight
color: Appearance.colors.colOnSurfaceVariant
text: `${(Battery.health).toFixed(1)}%`
}
}
RowLayout {
spacing: 5
Layout.fillWidth: true