# HG changeset patch # User sl # Date 1401738963 -7200 # Node ID 8297924aa384d9fef0d691c5c28132241e13df77 # Parent 3d3f781bf5431045350c169be595a55ca3fa326a Putting our marquee control on our display. diff -r 3d3f781bf543 -r 8297924aa384 MarqueeText.qml --- a/MarqueeText.qml Mon Jun 02 18:52:31 2014 +0200 +++ b/MarqueeText.qml Mon Jun 02 21:56:03 2014 +0200 @@ -1,27 +1,32 @@ import QtQuick 2.2 +import QtQuick.Controls 1.2 Item { - id:marqueeText + id:item height: scrollingText.height clip: true + antialiasing: false property int pixelsPerSeconds:25 property alias text: scrollingText.text property alias separator: separatorText.text - Text { + Label { id:scrollingText + antialiasing: item.antialiasing } - Text { + Label { id:separatorText text:" || " x:scrollingText.x+scrollingText.width + antialiasing: item.antialiasing } - Text { + Label { id:followingText text:scrollingText.text x:scrollingText.x+scrollingText.width+separatorText.width + antialiasing: item.antialiasing } ParallelAnimation { diff -r 3d3f781bf543 -r 8297924aa384 TestsTab.qml --- a/TestsTab.qml Mon Jun 02 18:52:31 2014 +0200 +++ b/TestsTab.qml Mon Jun 02 21:56:03 2014 +0200 @@ -51,6 +51,16 @@ smooth: false } + MarqueeText { + width: 256 + pixelsPerSeconds:50 + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + text: "start ------ abcdefghijklmnopqrtaksdjfkdfjklsdjflksdjfklsjadfkljsad;flasjdlfjasdfjldsdfljf---- end" + //text: "start ------ end" + separator: " | " + } + GridLayout { anchors.fill:parent anchors.margins: 6 @@ -248,9 +258,9 @@ // Rectangle { - border.width: 2 + border.width: 1 border.color: "black" - color: "lightsteelblue" + color: "white" anchors.horizontalCenter: parent.horizontalCenter width: 250 height: text.height + 10