Skip to content

quicksettings: implement marquee label and use it for quicksettings status label

Yari Polla requested to merge skilvingr/plasma-mobile:flowing-labels into master

Hi lads, as said in the title, this MR implements marquee (flowing) text for quicksettings status label. This way we can avoid text elision and address issues like #158 (closed).

I've chosen a timer-based approach, due to its low CPU consumption: a NumberAnimation-based one would be relatively much more hungry and would bring troubles with labels overflow (from a graphical point of view).

One last part should be considered: here we are creating a Timer for each quicksetting, therefore, even if these timers don't run if there isn't a text overflow (thus sparing CPU), logic suggests that this approach should lead to a waste of memory. Because of this, here I also tried creating them only if strictly needed (via Qt.createQmlObject()), but that seems to lead to an even higher memory usage; don't know why.

Edited by Yari Polla

Merge request reports