Testing our double marquee.
1.1 --- a/MarqueeText.qml Wed Jun 04 19:30:54 2014 +0200
1.2 +++ b/MarqueeText.qml Wed Jun 04 21:56:36 2014 +0200
1.3 @@ -14,6 +14,7 @@
1.4 Label {
1.5 id:scrollingText
1.6 antialiasing: item.antialiasing
1.7 + onFontChanged: {item.height=height}
1.8 }
1.9
1.10 Label {
2.1 --- a/TestsTab.qml Wed Jun 04 19:30:54 2014 +0200
2.2 +++ b/TestsTab.qml Wed Jun 04 21:56:36 2014 +0200
2.3 @@ -16,8 +16,8 @@
2.4 //anchors.fill:parent
2.5
2.6 Settings {
2.7 - //property alias fontLineTop: marqueeLineTop.font;
2.8 - //property alias fontLineBottom: marqueeLineBottom.font;
2.9 + property alias fontLineTop: marqueeLineTop.font;
2.10 + property alias fontLineBottom: marqueeLineBottom.font;
2.11 }
2.12
2.13
2.14 @@ -33,8 +33,6 @@
2.15 //24 FPS
2.16 //property int timeoutInterval: 41
2.17 //32 FPS
2.18 - property int timeoutInterval: 33
2.19 - signal timeout
2.20 //! [splash-properties]
2.21 //! [screen-properties]
2.22 //Here comes some trick to keep our display frame within our app.
2.23 @@ -65,7 +63,8 @@
2.24 MarqueeText {
2.25 id: marqueeLineTop
2.26 width: 256
2.27 - pixelsPerSeconds:50
2.28 + height: 32
2.29 + pixelsPerSeconds:25
2.30 //anchors.verticalCenter: parent.verticalCenter
2.31 //anchors.horizontalCenter: parent.horizontalCenter
2.32 text: "start ---- ABCDEFGHIJKLMNOPQRSTUVWXYZ ---- end"
2.33 @@ -75,7 +74,8 @@
2.34 MarqueeText {
2.35 id: marqueeLineBottom
2.36 width: 256
2.37 - pixelsPerSeconds:50
2.38 + height: 32
2.39 + pixelsPerSeconds:25
2.40 //anchors.verticalCenter: parent.verticalCenter
2.41 //anchors.horizontalCenter: parent.horizontalCenter
2.42 text: "start ---- abcdefghijklmnopqrstuvwxyz-1234567890 ---- end"
2.43 @@ -96,10 +96,10 @@
2.44 function doFrame(frameCount)
2.45 {
2.46 //Skip every second frame otherwise our UI lags.
2.47 - if (frameCount%2!=0)
2.48 + if (frameCount%4!=0)
2.49 {
2.50 //labelFrameTick.text="-";
2.51 - //return;
2.52 + return;
2.53 }
2.54 //labelFrameTick.text="+";
2.55
2.56 @@ -112,7 +112,7 @@
2.57 }
2.58
2.59
2.60 - var frameCounter=(frameCount-firstFrame)/2;
2.61 + var frameCounter=(frameCount-firstFrame)/4;
2.62 labelFrameCount.text=frameCounter;
2.63 labelTime.text=milliseconds/1000;
2.64 labelTimePerFrame.text=(milliseconds/frameCounter).toFixed(3);