Added new statuses

This commit is contained in:
Yury Shuvakin
2025-11-21 14:42:03 +03:00
parent b861ce003c
commit fbfdc35e0f
4 changed files with 28 additions and 11 deletions

View File

@@ -33,10 +33,25 @@ Rectangle {
}
CustomControls.Button {
id: modeButton
text: chargeTypeToString(battery ? battery.chargeType : 0)
backgroundColor: workingModeToColor(battery ? battery.workingMode : 0)
Layout.preferredWidth: 180
onClicked: battery ? battery.actionButtonClicked() : null
onClicked: {
battery ? battery.actionButtonClicked() : null
enabled = false
enableTimer.start()
}
Timer {
id: enableTimer
interval: 2000
onTriggered: {
modeButton.enabled = true
}
}
}
}

View File

@@ -20,7 +20,7 @@ Controls.Button {
contentItem: Text {
text: control.text
font: control.font
opacity: enabled ? 1.0 : 0.3
opacity: enabled ? 1.0 : 0.5
color: Palette.alternativeTextColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter