Adding reset function called when changing font.
1.1 --- a/MarqueeText.qml Wed Jun 04 21:56:36 2014 +0200
1.2 +++ b/MarqueeText.qml Tue Jun 17 09:49:12 2014 +0200
1.3 @@ -11,10 +11,20 @@
1.4 property alias separator: separatorText.text
1.5 property alias font: scrollingText.font
1.6
1.7 + function reset ()
1.8 + {
1.9 + animation.stop();
1.10 + scrollingText.x=0;
1.11 + separatorText.x=scrollingText.x+scrollingText.width;
1.12 + followingText.x=scrollingText.x+scrollingText.width+separatorText.width
1.13 +
1.14 + console.log("reset")
1.15 + }
1.16 +
1.17 Label {
1.18 id:scrollingText
1.19 antialiasing: item.antialiasing
1.20 - onFontChanged: {item.height=height}
1.21 + onFontChanged: item.reset()
1.22 }
1.23
1.24 Label {