mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Battery: change panel labels
This commit is contained in:
@@ -11,7 +11,7 @@ NPanel {
|
||||
id: root
|
||||
|
||||
preferredWidth: 300
|
||||
preferredHeight: 200
|
||||
preferredHeight: 210
|
||||
panelKeyboardFocus: true
|
||||
|
||||
property var optionsModel: []
|
||||
@@ -27,7 +27,7 @@ NPanel {
|
||||
"icon": "battery-3"
|
||||
}, {
|
||||
"id": BatteryService.ChargingMode.Conservative,
|
||||
"label": "battery.panel.conservative",
|
||||
"label": "battery.panel.lifespan",
|
||||
"icon": "battery-2"
|
||||
}]
|
||||
root.optionsModel = newOptions
|
||||
@@ -50,12 +50,6 @@ NPanel {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginM * scaling
|
||||
|
||||
NIcon {
|
||||
icon: optionsModel[BatteryService.chargingMode].icon
|
||||
pointSize: Style.fontSizeXXL * scaling
|
||||
color: Color.mPrimary
|
||||
}
|
||||
|
||||
NText {
|
||||
text: I18n.tr("battery.panel.title")
|
||||
pointSize: Style.fontSizeL * scaling
|
||||
@@ -88,7 +82,9 @@ NPanel {
|
||||
NRadioButton {
|
||||
ButtonGroup.group: batteryGroup
|
||||
required property var modelData
|
||||
text: I18n.tr(modelData.label)
|
||||
text: I18n.tr(modelData.label, {
|
||||
"percentage": BatteryService.getThresholdValue(modelData.id)
|
||||
})
|
||||
checked: BatteryService.chargingMode === modelData.id
|
||||
onClicked: {
|
||||
BatteryService.setChargingMode(modelData.id)
|
||||
|
||||
Reference in New Issue
Block a user