update to battery.qml
This commit is contained in:
@@ -7,7 +7,7 @@ PopupWindow {
|
|||||||
|
|
||||||
property Item anchorItem
|
property Item anchorItem
|
||||||
property bool anchorHovered: false
|
property bool anchorHovered: false
|
||||||
property int minpopupWidth: 300
|
property int minpopupWidth: 150
|
||||||
property int minpopupHeight: 50
|
property int minpopupHeight: 50
|
||||||
property int popupVerticalOffset: 0
|
property int popupVerticalOffset: 0
|
||||||
property int spacingValue: 12
|
property int spacingValue: 12
|
||||||
|
|||||||
@@ -117,4 +117,72 @@ MouseArea {
|
|||||||
console.log("[Battery] Expanded: " + expanded + ", percentage: " + BatteryState.percentage + "%, charging: " + BatteryState.charging)
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,6 @@ Rectangle { //workspace
|
|||||||
Column {
|
Column {
|
||||||
spacing: parent.spacing
|
spacing: parent.spacing
|
||||||
Text {
|
Text {
|
||||||
id: text0
|
|
||||||
text: ClockState.shortDate + ClockState.currentTime
|
text: ClockState.shortDate + ClockState.currentTime
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -77,7 +76,6 @@ Rectangle { //workspace
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text1
|
|
||||||
text: ClockState.fullDate
|
text: ClockState.fullDate
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -88,7 +86,6 @@ Rectangle { //workspace
|
|||||||
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text2
|
|
||||||
text: ClockState.uptime
|
text: ClockState.uptime
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ MouseArea {
|
|||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("[Network] Refreshing... current status: " + NetworkState.status)
|
console.log("[Network] Refreshing... current status: " + NetworkState.status)
|
||||||
|
NetworkState.networkScript.running = false
|
||||||
NetworkState.networkScript.running = true
|
NetworkState.networkScript.running = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +45,6 @@ MouseArea {
|
|||||||
Column {
|
Column {
|
||||||
spacing: parent.spacing
|
spacing: parent.spacing
|
||||||
Text {
|
Text {
|
||||||
id: text1
|
|
||||||
text: "interfaceName: " + NetworkState.interfaceName
|
text: "interfaceName: " + NetworkState.interfaceName
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -54,7 +54,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text2
|
|
||||||
text: "interfaceType: " + NetworkState.interfaceType
|
text: "interfaceType: " + NetworkState.interfaceType
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -64,7 +63,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text3
|
|
||||||
text: "connectionName: " + NetworkState.connectionName
|
text: "connectionName: " + NetworkState.connectionName
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -74,7 +72,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text4
|
|
||||||
text: "ipv4: " + NetworkState.ipv4
|
text: "ipv4: " + NetworkState.ipv4
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -84,7 +81,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text45
|
|
||||||
text: "wifiName: " + NetworkState.wifiName
|
text: "wifiName: " + NetworkState.wifiName
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -94,7 +90,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text5
|
|
||||||
text: "signalStrength: " + NetworkState.signalStrength
|
text: "signalStrength: " + NetworkState.signalStrength
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -104,7 +99,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text6
|
|
||||||
text: "wifiChannel: " + NetworkState.wifiChannel
|
text: "wifiChannel: " + NetworkState.wifiChannel
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -114,7 +108,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text7
|
|
||||||
text: "wifiFrequency: " + NetworkState.wifiFrequency
|
text: "wifiFrequency: " + NetworkState.wifiFrequency
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -124,7 +117,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text8
|
|
||||||
text: "linkSpeed: " + NetworkState.linkSpeed
|
text: "linkSpeed: " + NetworkState.linkSpeed
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -134,7 +126,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text9
|
|
||||||
text: "downloadSpeed: " + NetworkState.downloadSpeed
|
text: "downloadSpeed: " + NetworkState.downloadSpeed
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -144,7 +135,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text10
|
|
||||||
text: "uploadSpeed: " + NetworkState.uploadSpeed
|
text: "uploadSpeed: " + NetworkState.uploadSpeed
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -154,7 +144,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text11
|
|
||||||
text: "ping: " + NetworkState.ping
|
text: "ping: " + NetworkState.ping
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -164,7 +153,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text12
|
|
||||||
text: "internetAvailable: " + NetworkState.internetAvailable
|
text: "internetAvailable: " + NetworkState.internetAvailable
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -174,7 +162,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text13
|
|
||||||
text: "vpnConnected: " + NetworkState.vpnConnected
|
text: "vpnConnected: " + NetworkState.vpnConnected
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -184,7 +171,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text14
|
|
||||||
text: "vpnName: " + NetworkState.vpnName
|
text: "vpnName: " + NetworkState.vpnName
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -194,7 +180,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text15
|
|
||||||
text: "vpnIp: " + NetworkState.vpnIp
|
text: "vpnIp: " + NetworkState.vpnIp
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -204,7 +189,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text16
|
|
||||||
text: "tailscaleConnected: " + NetworkState.tailscaleConnected
|
text: "tailscaleConnected: " + NetworkState.tailscaleConnected
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
@@ -214,7 +198,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text17
|
|
||||||
text: "tailscaleIp: " + NetworkState.tailscaleIp
|
text: "tailscaleIp: " + NetworkState.tailscaleIp
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Colors.primary
|
color: Colors.primary
|
||||||
|
|||||||
Reference in New Issue
Block a user