update to battery.qml
This commit is contained in:
@@ -117,4 +117,72 @@ MouseArea {
|
||||
console.log("[Battery] Expanded: " + expanded + ", percentage: " + BatteryState.percentage + "%, charging: " + BatteryState.charging)
|
||||
}
|
||||
|
||||
|
||||
BarPopup {
|
||||
id: batteryPopup
|
||||
anchorItem: batteryButton
|
||||
anchorHovered: batteryButton.containsMouse
|
||||
spacingValue: Config.spacing_fun(batteryButton.height)
|
||||
radiusValue: Config.radius_fun(batteryButton.height)
|
||||
|
||||
Column {
|
||||
spacing: parent.spacing
|
||||
Text {
|
||||
text: "percentage: " + BatteryState.percentage + "%"
|
||||
wrapMode: Text.WordWrap
|
||||
color: Colors.primary
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pixelSize: Config.font_size_tiny(bar.height)
|
||||
font.family: Config.font
|
||||
}
|
||||
Text {
|
||||
text: "charging: " + BatteryState.charging
|
||||
wrapMode: Text.WordWrap
|
||||
color: Colors.primary
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pixelSize: Config.font_size_tiny(bar.height)
|
||||
font.family: Config.font
|
||||
}
|
||||
Text {
|
||||
text: "energy: " + BatteryState.energy
|
||||
wrapMode: Text.WordWrap
|
||||
color: Colors.primary
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pixelSize: Config.font_size_tiny(bar.height)
|
||||
font.family: Config.font
|
||||
}
|
||||
Text {
|
||||
text: "voltage: " + BatteryState.voltage
|
||||
wrapMode: Text.WordWrap
|
||||
color: Colors.primary
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pixelSize: Config.font_size_tiny(bar.height)
|
||||
font.family: Config.font
|
||||
}
|
||||
Text {
|
||||
text: "charge_cycle: " + BatteryState.charge_cycle
|
||||
wrapMode: Text.WordWrap
|
||||
color: Colors.primary
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pixelSize: Config.font_size_tiny(bar.height)
|
||||
font.family: Config.font
|
||||
}
|
||||
Text {
|
||||
text: "time_to_empty: " + BatteryState.time_to_empty + "h"
|
||||
wrapMode: Text.WordWrap
|
||||
color: Colors.primary
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pixelSize: Config.font_size_tiny(bar.height)
|
||||
font.family: Config.font
|
||||
}
|
||||
Text {
|
||||
text: "energy_rate: " + BatteryState.energy_rate + "W"
|
||||
wrapMode: Text.WordWrap
|
||||
color: Colors.primary
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pixelSize: Config.font_size_tiny(bar.height)
|
||||
font.family: Config.font
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user