components/marqueelabel: avoid useless double binding

This commit is contained in:
Yari Polla 2022-05-17 22:01:04 +02:00 committed by Devin Lin
parent 6b058ec9d9
commit 0368834d2c

View file

@ -20,7 +20,6 @@ PlasmaComponents.Label {
property int interval: PlasmaCore.Units.longDuration
readonly property int charactersOverflow: Math.ceil((txtMeter.advanceWidth - root.width) / (txtMeter.advanceWidth / inputText.length))
readonly property string displayedText: inputText.substring(step, step + inputText.length - charactersOverflow)
property int step: 0
TextMetrics {
@ -60,5 +59,5 @@ PlasmaComponents.Label {
}
}
text: displayedText
text: inputText.substring(step, step + inputText.length - charactersOverflow)
}