# HG changeset patch # User sl # Date 1401911796 -7200 # Node ID 2868107ea71d627aafd3be1d7618c3ae68ab208a # Parent f2c87f0cfabef2296b923048d07f36e426bd5016 Testing our double marquee. diff -r f2c87f0cfabe -r 2868107ea71d MarqueeText.qml --- a/MarqueeText.qml Wed Jun 04 19:30:54 2014 +0200 +++ b/MarqueeText.qml Wed Jun 04 21:56:36 2014 +0200 @@ -14,6 +14,7 @@ Label { id:scrollingText antialiasing: item.antialiasing + onFontChanged: {item.height=height} } Label { diff -r f2c87f0cfabe -r 2868107ea71d TestsTab.qml --- a/TestsTab.qml Wed Jun 04 19:30:54 2014 +0200 +++ b/TestsTab.qml Wed Jun 04 21:56:36 2014 +0200 @@ -16,8 +16,8 @@ //anchors.fill:parent Settings { - //property alias fontLineTop: marqueeLineTop.font; - //property alias fontLineBottom: marqueeLineBottom.font; + property alias fontLineTop: marqueeLineTop.font; + property alias fontLineBottom: marqueeLineBottom.font; } @@ -33,8 +33,6 @@ //24 FPS //property int timeoutInterval: 41 //32 FPS - property int timeoutInterval: 33 - signal timeout //! [splash-properties] //! [screen-properties] //Here comes some trick to keep our display frame within our app. @@ -65,7 +63,8 @@ MarqueeText { id: marqueeLineTop width: 256 - pixelsPerSeconds:50 + height: 32 + pixelsPerSeconds:25 //anchors.verticalCenter: parent.verticalCenter //anchors.horizontalCenter: parent.horizontalCenter text: "start ---- ABCDEFGHIJKLMNOPQRSTUVWXYZ ---- end" @@ -75,7 +74,8 @@ MarqueeText { id: marqueeLineBottom width: 256 - pixelsPerSeconds:50 + height: 32 + pixelsPerSeconds:25 //anchors.verticalCenter: parent.verticalCenter //anchors.horizontalCenter: parent.horizontalCenter text: "start ---- abcdefghijklmnopqrstuvwxyz-1234567890 ---- end" @@ -96,10 +96,10 @@ function doFrame(frameCount) { //Skip every second frame otherwise our UI lags. - if (frameCount%2!=0) + if (frameCount%4!=0) { //labelFrameTick.text="-"; - //return; + return; } //labelFrameTick.text="+"; @@ -112,7 +112,7 @@ } - var frameCounter=(frameCount-firstFrame)/2; + var frameCounter=(frameCount-firstFrame)/4; labelFrameCount.text=frameCounter; labelTime.text=milliseconds/1000; labelTimePerFrame.text=(milliseconds/frameCounter).toFixed(3);