summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@nokia.com>2010-12-20 10:35:43 +0100
committerJens Bache-Wiig <jens.bache-wiig@nokia.com>2010-12-20 10:35:43 +0100
commit95a4e92dc914e1e84cd2362742382b193ca4d416 (patch)
tree10baed2cf68e0c6c555adc83d8c904fbbb66a566 /examples
parent2a531de1294e828643758c4cc3e71ed18b8b5392 (diff)
downloadqtquickcontrols-95a4e92dc914e1e84cd2362742382b193ca4d416.tar.gz
Add initial LineEdit
Diffstat (limited to 'examples')
-rw-r--r--examples/meego/meegotheme/Button.qml13
-rw-r--r--examples/meego/meegotheme/LineEdit.qml26
2 files changed, 39 insertions, 0 deletions
diff --git a/examples/meego/meegotheme/Button.qml b/examples/meego/meegotheme/Button.qml
index 62fef334..6b0f6275 100644
--- a/examples/meego/meegotheme/Button.qml
+++ b/examples/meego/meegotheme/Button.qml
@@ -10,6 +10,19 @@ Components.Button {
//minimumWidth:100
minimumHeight: 40
+ Style {
+ id: meegostyle
+ styleClass: "MButtonStyle"
+ mode: {
+ if (button.containsMouse && button.pressed)
+ return "pressed"
+ else if (button.checked)
+ return "selected"
+ else
+ return "default"
+ }
+ }
+
background: BorderImage {
source: pressed ? "image://theme/meegotouch-button-background-pressed" :
"image://theme/meegotouch-button-background"
diff --git a/examples/meego/meegotheme/LineEdit.qml b/examples/meego/meegotheme/LineEdit.qml
new file mode 100644
index 00000000..12269cf8
--- /dev/null
+++ b/examples/meego/meegotheme/LineEdit.qml
@@ -0,0 +1,26 @@
+import Qt 4.7
+import "../../../components" as Components
+
+// ### import QtComponents to load meego imageprovider
+import com.meego.themebridge 1.0
+
+Components.LineEdit {
+ minimumHeight: 40
+
+ Style {
+ id: meegostyle
+ styleClass: "MTextEditStyle"
+ mode: inputElement.activeFocus ? "selected" : "default"
+ }
+ font: meegostyle.current.get("font")
+ textColor: meegostyle.current.get("textColor")
+
+ background: BorderImage {
+ source: "image://theme/meegotouch-textedit-background"
+ border.top: 12
+ border.bottom: 12
+ border.left: 12
+ border.right: 12
+ }
+}
+