update to battery.qml

This commit is contained in:
Honney
2026-06-22 13:21:47 +02:00
parent ec8d1045bf
commit 2eae90b6b5
4 changed files with 70 additions and 22 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ PopupWindow {
property Item anchorItem
property bool anchorHovered: false
property int minpopupWidth: 300
property int minpopupWidth: 150
property int minpopupHeight: 50
property int popupVerticalOffset: 0
property int spacingValue: 12
+68
View File
@@ -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
}
}
}
}
-3
View File
@@ -67,7 +67,6 @@ Rectangle { //workspace
Column {
spacing: parent.spacing
Text {
id: text0
text: ClockState.shortDate + ClockState.currentTime
wrapMode: Text.WordWrap
color: Colors.primary
@@ -77,7 +76,6 @@ Rectangle { //workspace
}
Text {
id: text1
text: ClockState.fullDate
wrapMode: Text.WordWrap
color: Colors.primary
@@ -88,7 +86,6 @@ Rectangle { //workspace
Text {
id: text2
text: ClockState.uptime
wrapMode: Text.WordWrap
color: Colors.primary
+1 -18
View File
@@ -13,6 +13,7 @@ MouseArea {
onClicked: {
console.log("[Network] Refreshing... current status: " + NetworkState.status)
NetworkState.networkScript.running = false
NetworkState.networkScript.running = true
}
@@ -44,7 +45,6 @@ MouseArea {
Column {
spacing: parent.spacing
Text {
id: text1
text: "interfaceName: " + NetworkState.interfaceName
wrapMode: Text.WordWrap
color: Colors.primary
@@ -54,7 +54,6 @@ MouseArea {
}
Text {
id: text2
text: "interfaceType: " + NetworkState.interfaceType
wrapMode: Text.WordWrap
color: Colors.primary
@@ -64,7 +63,6 @@ MouseArea {
}
Text {
id: text3
text: "connectionName: " + NetworkState.connectionName
wrapMode: Text.WordWrap
color: Colors.primary
@@ -74,7 +72,6 @@ MouseArea {
}
Text {
id: text4
text: "ipv4: " + NetworkState.ipv4
wrapMode: Text.WordWrap
color: Colors.primary
@@ -84,7 +81,6 @@ MouseArea {
}
Text {
id: text45
text: "wifiName: " + NetworkState.wifiName
wrapMode: Text.WordWrap
color: Colors.primary
@@ -94,7 +90,6 @@ MouseArea {
}
Text {
id: text5
text: "signalStrength: " + NetworkState.signalStrength
wrapMode: Text.WordWrap
color: Colors.primary
@@ -104,7 +99,6 @@ MouseArea {
}
Text {
id: text6
text: "wifiChannel: " + NetworkState.wifiChannel
wrapMode: Text.WordWrap
color: Colors.primary
@@ -114,7 +108,6 @@ MouseArea {
}
Text {
id: text7
text: "wifiFrequency: " + NetworkState.wifiFrequency
wrapMode: Text.WordWrap
color: Colors.primary
@@ -124,7 +117,6 @@ MouseArea {
}
Text {
id: text8
text: "linkSpeed: " + NetworkState.linkSpeed
wrapMode: Text.WordWrap
color: Colors.primary
@@ -134,7 +126,6 @@ MouseArea {
}
Text {
id: text9
text: "downloadSpeed: " + NetworkState.downloadSpeed
wrapMode: Text.WordWrap
color: Colors.primary
@@ -144,7 +135,6 @@ MouseArea {
}
Text {
id: text10
text: "uploadSpeed: " + NetworkState.uploadSpeed
wrapMode: Text.WordWrap
color: Colors.primary
@@ -154,7 +144,6 @@ MouseArea {
}
Text {
id: text11
text: "ping: " + NetworkState.ping
wrapMode: Text.WordWrap
color: Colors.primary
@@ -164,7 +153,6 @@ MouseArea {
}
Text {
id: text12
text: "internetAvailable: " + NetworkState.internetAvailable
wrapMode: Text.WordWrap
color: Colors.primary
@@ -174,7 +162,6 @@ MouseArea {
}
Text {
id: text13
text: "vpnConnected: " + NetworkState.vpnConnected
wrapMode: Text.WordWrap
color: Colors.primary
@@ -184,7 +171,6 @@ MouseArea {
}
Text {
id: text14
text: "vpnName: " + NetworkState.vpnName
wrapMode: Text.WordWrap
color: Colors.primary
@@ -194,7 +180,6 @@ MouseArea {
}
Text {
id: text15
text: "vpnIp: " + NetworkState.vpnIp
wrapMode: Text.WordWrap
color: Colors.primary
@@ -204,7 +189,6 @@ MouseArea {
}
Text {
id: text16
text: "tailscaleConnected: " + NetworkState.tailscaleConnected
wrapMode: Text.WordWrap
color: Colors.primary
@@ -214,7 +198,6 @@ MouseArea {
}
Text {
id: text17
text: "tailscaleIp: " + NetworkState.tailscaleIp
wrapMode: Text.WordWrap
color: Colors.primary