Hi,
I’ve just updated my system to Plasma 6.1 from 5.x (don’t remember, probably the last one). I’m excited about all the new goodness but I can’t get my Panel widgets to work as they did.
Back in 5.x, I’ve created a simple sensor face for “System Monitor Sensor” widget. It was a plain text in compact view (used in panel).
Back then, when creating this sensor face, I’d followed this guide: Creating sensor faces | Developer
The QML I used was just:
Faces.SensorFace {
contentItem: RowLayout {
Repeater {
model: controller.highPrioritySensorIds
delegate: Label {
text: i18n(sensor.formattedValue)
Layout.alignment: Qt.AlignHCenter
Sensors.Sensor {
id: sensor
sensorId: modelData
}
}
}
}
}
Unfortunately, it no longer works (nothing gets displayed) in Plasma 6.1.
As a temporary solution, I’ve managed to get the values showing by “adapting” (stripping down) the org.kde.ksysguard.textonly
preinstalled sensor face. This is clearly not the proper way to achieve what I intent to (displaying just text value, without any labels), and it does not look good (black bars in the background).
Faces.CompactSensorFace {
id: root
contentItem: ChartsControls.LegendLayout {
Repeater {
model: root.controller.highPrioritySensorIds
ChartsControls.LegendDelegate {
value: sensor.formattedValue
Sensors.Sensor {
id: sensor
sensorId: modelData
updateRateLimit: root.controller.updateRateLimit
}
}
}
}
}
I “have to” create the sensor face, because the default org.kde.ksysguard.textonly
displays the label and color bar, both of which I don’t need.
I suspect the solution might be to use another class instead of ChartsControls.LegendLayout
. But, even if my assumption is correct, I don’t know which one. Can anyone please help me in getting my text sensors in KDE Plasma 6+ back?