# HG changeset patch # User sl # Date 1402991352 -7200 # Node ID f2a9369e7fb980079a12c2e7d646acfba5928b81 # Parent 2868107ea71d627aafd3be1d7618c3ae68ab208a Adding reset function called when changing font. diff -r 2868107ea71d -r f2a9369e7fb9 MarqueeText.qml --- a/MarqueeText.qml Wed Jun 04 21:56:36 2014 +0200 +++ b/MarqueeText.qml Tue Jun 17 09:49:12 2014 +0200 @@ -11,10 +11,20 @@ property alias separator: separatorText.text property alias font: scrollingText.font + function reset () + { + animation.stop(); + scrollingText.x=0; + separatorText.x=scrollingText.x+scrollingText.width; + followingText.x=scrollingText.x+scrollingText.width+separatorText.width + + console.log("reset") + } + Label { id:scrollingText antialiasing: item.antialiasing - onFontChanged: {item.height=height} + onFontChanged: item.reset() } Label {