diff options
-rw-r--r-- | doc/src/images/qml-focus-example.png | bin | 43921 -> 31370 bytes | |||
-rw-r--r-- | examples/declarative/animation/behaviors/behavior-example.qml | 2 | ||||
-rw-r--r-- | examples/declarative/keyinteraction/focus/Core/GridMenu.qml | 7 | ||||
-rw-r--r-- | examples/declarative/keyinteraction/focus/Core/ListViews.qml | 4 | ||||
-rw-r--r-- | examples/declarative/keyinteraction/focus/focus.qml | 5 | ||||
-rw-r--r-- | examples/declarative/ui-components/progressbar/content/ProgressBar.qml | 2 | ||||
-rw-r--r-- | examples/declarative/ui-components/searchbox/SearchBox.qml | 2 | ||||
-rw-r--r-- | examples/declarative/ui-components/tabwidget/main.qml | 6 |
8 files changed, 15 insertions, 13 deletions
diff --git a/doc/src/images/qml-focus-example.png b/doc/src/images/qml-focus-example.png Binary files differindex 0ec2bff..107d2cb 100644 --- a/doc/src/images/qml-focus-example.png +++ b/doc/src/images/qml-focus-example.png diff --git a/examples/declarative/animation/behaviors/behavior-example.qml b/examples/declarative/animation/behaviors/behavior-example.qml index d187fbf..adefb9e 100644 --- a/examples/declarative/animation/behaviors/behavior-example.qml +++ b/examples/declarative/animation/behaviors/behavior-example.qml @@ -82,7 +82,7 @@ Rectangle { property string text - x: 62.5; y: 75; width: 75; height: 50 + x: 62; y: 75; width: 75; height: 50 radius: 6 border.width: 4; border.color: "white" color: "firebrick" diff --git a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml index d0b45f5..9a8d3f3 100644 --- a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml +++ b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml @@ -55,10 +55,11 @@ FocusScope { GridView { id: gridView - x: 20; width: parent.width - 40; height: parent.height + anchors.fill: parent; anchors.leftMargin: 20; anchors.rightMargin: 20 cellWidth: 152; cellHeight: 152 focus: true model: 12 + KeyNavigation.down: listViews KeyNavigation.left: contextMenu @@ -70,9 +71,9 @@ FocusScope { id: content color: "transparent" smooth: true - anchors.centerIn: parent; width: container.width - 40; height: container.height - 40; radius: 10 + anchors.fill: parent; anchors.margins: 20; radius: 10 - Rectangle { color: "#91AA9D"; x: 3; y: 3; width: parent.width - 6; height: parent.height - 6; radius: 8 } + Rectangle { color: "#91AA9D"; anchors.fill: parent; anchors.margins: 3; radius: 8; smooth: true } Image { source: "images/qt-logo.png"; anchors.centerIn: parent; smooth: true } } diff --git a/examples/declarative/keyinteraction/focus/Core/ListViews.qml b/examples/declarative/keyinteraction/focus/Core/ListViews.qml index 670a3fa..6f9ceb4 100644 --- a/examples/declarative/keyinteraction/focus/Core/ListViews.qml +++ b/examples/declarative/keyinteraction/focus/Core/ListViews.qml @@ -60,7 +60,7 @@ FocusScope { ListView { id: list2 - y: wantsFocus ? 10 : 40; x: parent.width / 3; width: parent.width / 3; height: parent.height - 20 + y: wantsFocus ? 10 : 40; x: parseInt(parent.width / 3); width: parent.width / 3; height: parent.height - 20 KeyNavigation.up: gridMenu; KeyNavigation.left: list1; KeyNavigation.right: list3 model: 10; cacheBuffer: 200 delegate: ListViewDelegate {} @@ -72,7 +72,7 @@ FocusScope { ListView { id: list3 - y: wantsFocus ? 10 : 40; x: 2 * parent.width / 3; width: parent.width / 3; height: parent.height - 20 + y: wantsFocus ? 10 : 40; x: parseInt(2 * parent.width / 3); width: parent.width / 3; height: parent.height - 20 KeyNavigation.up: gridMenu; KeyNavigation.left: list2 model: 10; cacheBuffer: 200 delegate: ListViewDelegate {} diff --git a/examples/declarative/keyinteraction/focus/focus.qml b/examples/declarative/keyinteraction/focus/focus.qml index 068ba1d..8b2af70 100644 --- a/examples/declarative/keyinteraction/focus/focus.qml +++ b/examples/declarative/keyinteraction/focus/focus.qml @@ -68,7 +68,8 @@ Rectangle { Rectangle { id: shade - color: "black"; opacity: 0; anchors.fill: parent + anchors.fill: parent + color: "black"; opacity: 0 } states: State { @@ -88,7 +89,7 @@ Rectangle { 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" } } diff --git a/examples/declarative/ui-components/progressbar/content/ProgressBar.qml b/examples/declarative/ui-components/progressbar/content/ProgressBar.qml index 829ab9b..6aa6765 100644 --- a/examples/declarative/ui-components/progressbar/content/ProgressBar.qml +++ b/examples/declarative/ui-components/progressbar/content/ProgressBar.qml @@ -66,7 +66,7 @@ Item { width: highlight.widthDest Behavior on width { SmoothedAnimation { velocity: 1200 } } - anchors { left: parent.left; top: parent.top; bottom: parent.bottom; leftMargin: 3; topMargin: 3; bottomMargin: 3 } + anchors { left: parent.left; top: parent.top; bottom: parent.bottom; margins: 3 } radius: 1 gradient: Gradient { GradientStop { id: gradient1; position: 0.0 } diff --git a/examples/declarative/ui-components/searchbox/SearchBox.qml b/examples/declarative/ui-components/searchbox/SearchBox.qml index e6b9c8f..6d87837 100644 --- a/examples/declarative/ui-components/searchbox/SearchBox.qml +++ b/examples/declarative/ui-components/searchbox/SearchBox.qml @@ -73,7 +73,7 @@ FocusScope { TextInput { id: textInput - anchors { left: parent.left; leftMargin: 8; verticalCenter: parent.verticalCenter } + anchors { left: parent.left; leftMargin: 8; right: clear.left; rightMargin: 8; verticalCenter: parent.verticalCenter } focus: true } diff --git a/examples/declarative/ui-components/tabwidget/main.qml b/examples/declarative/ui-components/tabwidget/main.qml index e11902a..4a27806 100644 --- a/examples/declarative/ui-components/tabwidget/main.qml +++ b/examples/declarative/ui-components/tabwidget/main.qml @@ -50,7 +50,7 @@ TabWidget { color: "#e3e3e3" Rectangle { - anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 } + anchors.fill: parent; anchors.margins: 20 color: "#ff7f7f" Text { width: parent.width - 20 @@ -68,7 +68,7 @@ TabWidget { color: "#e3e3e3" Rectangle { - anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 } + anchors.fill: parent; anchors.margins: 20 color: "#7fff7f" Text { width: parent.width - 20 @@ -85,7 +85,7 @@ TabWidget { anchors.fill: parent; color: "#e3e3e3" Rectangle { - anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 } + anchors.fill: parent; anchors.margins: 20 color: "#7f7fff" Text { width: parent.width - 20 |