Verified Commit 1d612571 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

taskmanager: Only update the task label when visible

When the task label is not visible, we should not bind text to

This is expected to slightly reduce the power consumption in daily usage.

BUG: 414121
parent 6c1db6bf
Pipeline #114011 passed with stage
in 2 minutes and 47 seconds
......@@ -504,12 +504,22 @@ MouseArea {
bottomMargin: taskFrame.margins.bottom
text: model.display || ""
wrapMode: (maximumLineCount == 1) ? Text.NoWrap : Text.Wrap
elide: Text.ElideRight
textFormat: Text.PlainText
verticalAlignment: Text.AlignVCenter
maximumLineCount: plasmoid.configuration.maxTextLines || undefined
// use State to avoid unnecessary re-evaluation when the label is invisible
states: State {
name: "labelVisible"
when: label.visible
PropertyChanges {
target: label
text: model.display || ""
states: [
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment