summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@nokia.com>2010-12-20 10:42:04 +0100
committerJens Bache-Wiig <jens.bache-wiig@nokia.com>2010-12-20 10:42:04 +0100
commit1325eae49ec2a9e9f0d5263fce7cddd8a8d9c2c1 (patch)
tree6d1464f1c3f8c7abf1d11fbb0bc8e04d25fd0ed5 /examples
parentcfe2888acf1375215f1038e9f94092b0c3f3ebb5 (diff)
downloadqtquickcontrols-1325eae49ec2a9e9f0d5263fce7cddd8a8d9c2c1.tar.gz
Add Label to meego
Diffstat (limited to 'examples')
-rw-r--r--examples/meego/meegotheme/Label.qml57
1 files changed, 57 insertions, 0 deletions
diff --git a/examples/meego/meegotheme/Label.qml b/examples/meego/meegotheme/Label.qml
new file mode 100644
index 00000000..10537dc4
--- /dev/null
+++ b/examples/meego/meegotheme/Label.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Components project on Qt Labs.
+**
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions contained
+** in the Technology Preview License Agreement accompanying this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+****************************************************************************/
+
+import Qt 4.7
+import com.meego.themebridge 1.0
+
+Text {
+ id: root
+ property alias styleObjectName: meegostyle.styleObjectName
+
+ // XXX This is a temporary solution to avoid creating an extra
+ // wrapper around Text to implement the margins
+ anchors.leftMargin: meegostyle.current.get("marginLeft")
+ anchors.rightMargin: meegostyle.current.get("marginRight")
+ anchors.topMargin: meegostyle.current.get("marginTop")
+ anchors.bottomMargin: meegostyle.current.get("marginBottom")
+
+ font.bold: meegostyle.font.bold
+ font.capitalization: meegostyle.font.capitalization
+ font.family: meegostyle.font.family
+ font.italic: meegostyle.font.italic
+ font.letterSpacing: meegostyle.font.letterSpacing
+ font.pixelSize: meegostyle.font.pixelSize
+ font.weight: meegostyle.font.weight
+ font.wordSpacing: meegostyle.font.wordSpacing
+
+ color: meegostyle.current.get("color")
+
+ Style {
+ id: meegostyle
+ styleClass: "MLabelStyle"
+ property variant font: meegostyle.current.get("font")
+ }
+}