This commit is contained in:
Ly-sec
2025-11-22 18:04:56 +01:00
20 changed files with 1108 additions and 394 deletions
+12 -8
View File
@@ -28,13 +28,13 @@ SmartPanel {
return I18n.tr("battery.no-battery-detected");
if (charging && battery.timeToFull > 0) {
return I18n.tr("battery.time-until-full", {
"time": Time.formatVagueHumanReadableDuration(battery.timeToFull)
});
"time": Time.formatVagueHumanReadableDuration(battery.timeToFull)
});
}
if (!charging && battery.timeToEmpty > 0) {
return I18n.tr("battery.time-left", {
"time": Time.formatVagueHumanReadableDuration(battery.timeToEmpty)
});
"time": Time.formatVagueHumanReadableDuration(battery.timeToEmpty)
});
}
return I18n.tr("battery.idle");
}
@@ -154,7 +154,9 @@ SmartPanel {
visible: healthAvailable
NText {
text: I18n.tr("battery.health", {"percent": healthPercent})
text: I18n.tr("battery.health", {
"percent": healthPercent
})
color: Color.mOnSurface
pointSize: Style.fontSizeS
font.weight: Style.fontWeightMedium
@@ -179,7 +181,9 @@ SmartPanel {
Layout.fillWidth: true
spacing: Style.marginS
NIcon {
icon: PowerProfileService.getIcon(); pointSize: Style.fontSizeM; color: Color.mPrimary
icon: PowerProfileService.getIcon()
pointSize: Style.fontSizeM
color: Color.mPrimary
}
NText {
text: I18n.tr("battery.power-profile")
@@ -188,7 +192,7 @@ SmartPanel {
Layout.fillWidth: true
}
NText {
text: PowerProfileService.getName()
text: PowerProfileService.getName(profileIndex)
color: Color.mOnSurfaceVariant
}
}
@@ -273,7 +277,7 @@ SmartPanel {
interval: 1000
repeat: true
running: true
onTriggered: manualInhibitActive = manualInhibitorEnabled();
onTriggered: manualInhibitActive = manualInhibitorEnabled()
}
Connections {
@@ -14,6 +14,7 @@ ColumnLayout {
property string valueLabelMode: widgetData.labelMode !== undefined ? widgetData.labelMode : widgetMetadata.labelMode
property bool valueHideUnoccupied: widgetData.hideUnoccupied !== undefined ? widgetData.hideUnoccupied : widgetMetadata.hideUnoccupied
property bool valueFollowFocusedScreen: widgetData.followFocusedScreen !== undefined ? widgetData.followFocusedScreen : widgetMetadata.followFocusedScreen
property int valueCharacterCount: widgetData.characterCount !== undefined ? widgetData.characterCount : widgetMetadata.characterCount
function saveSettings() {
@@ -21,6 +22,7 @@ ColumnLayout {
settings.labelMode = valueLabelMode;
settings.hideUnoccupied = valueHideUnoccupied;
settings.characterCount = valueCharacterCount;
settings.followFocusedScreen = valueFollowFocusedScreen;
return settings;
}
@@ -51,6 +53,13 @@ ColumnLayout {
minimumWidth: 200
}
NToggle {
label: I18n.tr("bar.widget-settings.workspace.follow-focused-screen.label")
description: I18n.tr("bar.widget-settings.workspace.follow-focused-screen.description")
checked: valueFollowFocusedScreen
onToggled: checked => valueFollowFocusedScreen = checked
}
NToggle {
label: I18n.tr("bar.widget-settings.workspace.hide-unoccupied.label")
description: I18n.tr("bar.widget-settings.workspace.hide-unoccupied.description")
@@ -853,7 +853,6 @@ ColumnLayout {
}
}
}
}
// Miscellaneous
NCollapsible {