summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 15e77de..ba49d14 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 19f7235..88840cb 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 3d6ceab..6100b32 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 56fdffc..9463192 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 {