Added new statuses
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user