diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-05-18 09:01:02 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-05-18 09:01:02 +0200 |
commit | 07c56ca4fb8240bea18cf8e941e3c61b48d7e7ed (patch) | |
tree | ea346024bf42a7cf6a603693877bf34031ecfbbb /CodeSection.qml |
SceneGraph demo
Diffstat (limited to 'CodeSection.qml')
-rw-r--r-- | CodeSection.qml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/CodeSection.qml b/CodeSection.qml new file mode 100644 index 0000000..e1da4b3 --- /dev/null +++ b/CodeSection.qml @@ -0,0 +1,37 @@ +import QtQuick 2.0 + +Rectangle +{ + id: root + + property string text + property real fontSize: parent.baseFontSize / 2 + + gradient: Gradient { + GradientStop { position: 0; color: Qt.rgba(1, 1, 1, 0.3) } + GradientStop { position: 1; color: Qt.rgba(0, 0, 0, 0.3) } + } + + border.color: "lightsteelblue" + border.width: 2 + radius: 10 + + x: parent.width / 2 + width: parent.width / 2 + height: parent.height + + Item { + anchors.fill: parent + anchors.margins: 20 + clip: true + + Text { + id: textItem + anchors.fill: parent + text: root.text; + font.family: "courier" + font.pixelSize: root.fontSize + color: "white" + } + } +} |