summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-08-06 19:51:14 +0200
committerDavid Boddie <dboddie@trolltech.com>2010-08-06 19:51:14 +0200
commit86eec3f6f98b387bf6a815c1a8e916965928b317 (patch)
treeeae5c5e72da6fe0c5939e6b730f1218db7c6372d /examples
parent9d15caa7f1103060f5fe1f8283e834ff51591a3f (diff)
parentc45516f1f3781dcb504158f730b98897c7f2f2a1 (diff)
downloadqt4-tools-86eec3f6f98b387bf6a815c1a8e916965928b317.tar.gz
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Conflicts: src/declarative/util/qdeclarativeanimation.cpp
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ContextMenu.qml7
-rw-r--r--examples/declarative/keyinteraction/focus/Core/GridMenu.qml7
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ListMenu.qml (renamed from examples/declarative/keyinteraction/focus/Core/ListViews.qml)5
-rw-r--r--examples/declarative/keyinteraction/focus/focus.qml11
4 files changed, 22 insertions, 8 deletions
diff --git a/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml b/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml
index 15e77de938..ba49d143b3 100644
--- a/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml
+++ b/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml
@@ -53,6 +53,13 @@ FocusScope {
color: "#D1DBBD"
focus: true
Keys.onRightPressed: mainView.focus = true
+
+ Text {
+ anchors { top: parent.top; horizontalCenter: parent.horizontalCenter; margins: 30 }
+ color: "black"
+ font.pixelSize: 14
+ text: "Context Menu"
+ }
}
}
}
diff --git a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
index 19f723582f..88840cba86 100644
--- a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
+++ b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
@@ -43,7 +43,10 @@ import Qt 4.7
FocusScope {
property alias interactive: gridView.interactive
- onActiveFocusChanged: if (activeFocus) mainView.state = ""
+ onActiveFocusChanged: {
+ if (activeFocus)
+ mainView.state = ""
+ }
Rectangle {
anchors.fill: parent
@@ -60,7 +63,7 @@ FocusScope {
focus: true
model: 12
- KeyNavigation.down: listViews
+ KeyNavigation.down: listMenu
KeyNavigation.left: contextMenu
delegate: Item {
diff --git a/examples/declarative/keyinteraction/focus/Core/ListViews.qml b/examples/declarative/keyinteraction/focus/Core/ListMenu.qml
index 3d6ceabd9f..6100b32b70 100644
--- a/examples/declarative/keyinteraction/focus/Core/ListViews.qml
+++ b/examples/declarative/keyinteraction/focus/Core/ListMenu.qml
@@ -43,7 +43,10 @@ import Qt 4.7
FocusScope {
clip: true
- onActiveFocusChanged: if (activeFocus) mainView.state = "showListViews"
+ onActiveFocusChanged: {
+ if (activeFocus)
+ mainView.state = "showListViews"
+ }
ListView {
id: list1
diff --git a/examples/declarative/keyinteraction/focus/focus.qml b/examples/declarative/keyinteraction/focus/focus.qml
index 56fdffc6d9..9463192d25 100644
--- a/examples/declarative/keyinteraction/focus/focus.qml
+++ b/examples/declarative/keyinteraction/focus/focus.qml
@@ -55,27 +55,28 @@ Rectangle {
GridMenu {
id: gridMenu
-
width: parent.width; height: 320
+
focus: true
interactive: parent.activeFocus
}
- ListViews {
- id: listViews
+ ListMenu {
+ id: listMenu
y: 320; width: parent.width; height: 320
}
Rectangle {
id: shade
anchors.fill: parent
- color: "black"; opacity: 0
+ color: "black"
+ opacity: 0
}
states: State {
name: "showListViews"
PropertyChanges { target: gridMenu; y: -160 }
- PropertyChanges { target: listViews; y: 160 }
+ PropertyChanges { target: listMenu; y: 160 }
}
transitions: Transition {