[Qt-qml] Shiny!
alan.westbrook at nokia.com
alan.westbrook at nokia.com
Mon Jul 26 20:28:03 CEST 2010
I was messing about with some controls I had written, and I wrote this to see if it might make something look shiny.
And it did!
So I'd like to share it with everyone.
It's pretty much a poor man's shine plastered on top of anything you stick it in.
---8<--- Shine.qml ---8<----------8<----------------------
import Qt 4.7
Rectangle {
id: shine
radius: parent.radius - 1
smooth: true
gradient: Gradient {
GradientStop {
position: 0
color: "#aaffffff"
}
GradientStop {
position: 1
color: "#22ffffff"
}
}
anchors.fill: parent
anchors.bottomMargin: parent.height / 2
anchors.topMargin: 1
anchors.leftMargin: 1
anchors.rightMargin: 1
}
---8<--------------------------8<-----------------------------
Just place a Shine { } as the last item in an element, and Bam! lickable! =)
Alan
PS: Is there a site yet for sharing qml components?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100726/aaa50e42/attachment.html
More information about the Qt-qml
mailing list