examples/declarative/keyinteraction/focus/focus.qml
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
--- a/examples/declarative/keyinteraction/focus/focus.qml	Tue Jul 06 15:10:48 2010 +0300
+++ b/examples/declarative/keyinteraction/focus/focus.qml	Wed Aug 18 10:37:55 2010 +0300
@@ -58,7 +58,7 @@
 
             width: parent.width; height: 320
             focus: true
-            interactive: parent.wantsFocus
+            interactive: parent.activeFocus
         }
 
         ListViews {
@@ -68,7 +68,8 @@
 
         Rectangle { 
             id: shade
-            color: "black"; opacity: 0; anchors.fill: parent
+            anchors.fill: parent
+            color: "black"; opacity: 0 
         }
 
         states: State {
@@ -88,7 +89,7 @@
         anchors.verticalCenter: parent.verticalCenter
 
         MouseArea {
-            anchors { fill: parent; leftMargin: -10; topMargin: -10; rightMargin: -10; bottomMargin: -10 }
+            anchors.fill: parent; anchors.margins: -10
             onClicked: window.state = "contextMenuOpen"
         }
     }
@@ -97,7 +98,7 @@
 
     states: State {
         name: "contextMenuOpen"
-        when: !mainView.wantsFocus
+        when: !mainView.activeFocus
         PropertyChanges { target: contextMenu; x: 0; open: true }
         PropertyChanges { target: mainView; x: 130 }
         PropertyChanges { target: shade; opacity: 0.25 }