diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-09-26 14:10:14 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-09-26 14:13:35 +0200 |
commit | 11b066beb45e7da084c6f792cf9421d48d4b40bf (patch) | |
tree | 0a27017508682b812b9fa533a3cab95aeb3c33c6 /examples | |
parent | f1eef22d0d1ddcc2ee48e45e522788eb97f429b0 (diff) | |
parent | d1efdcd2beac4d40d06ac7258b4d84e4376ab9d6 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
examples/quickcontrols2/gallery/gallery.qrc
src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
src/quicktemplates2/qquickstackview_p.cpp
src/quicktemplates2/qquickstackview_p_p.h
tests/auto/controls/data/tst_stackview.qml
Change-Id: If451fe0e5653572d305b4de90a6d5cb878463e8d
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quickcontrols2/gallery/gallery.pro | 1 | ||||
-rw-r--r-- | examples/quickcontrols2/gallery/gallery.qml | 17 | ||||
-rw-r--r-- | examples/quickcontrols2/gallery/images/+material/back.png | bin | 0 -> 219 bytes | |||
-rw-r--r-- | examples/quickcontrols2/gallery/images/+material/back@2x.png | bin | 0 -> 299 bytes | |||
-rw-r--r-- | examples/quickcontrols2/gallery/images/+material/back@3x.png | bin | 0 -> 344 bytes | |||
-rw-r--r-- | examples/quickcontrols2/gallery/images/+material/back@4x.png | bin | 0 -> 473 bytes | |||
-rw-r--r-- | examples/quickcontrols2/gallery/images/back.png | bin | 0 -> 220 bytes | |||
-rw-r--r-- | examples/quickcontrols2/gallery/images/back@2x.png | bin | 0 -> 289 bytes | |||
-rw-r--r-- | examples/quickcontrols2/gallery/images/back@3x.png | bin | 0 -> 351 bytes | |||
-rw-r--r-- | examples/quickcontrols2/gallery/images/back@4x.png | bin | 0 -> 452 bytes |
10 files changed, 13 insertions, 5 deletions
diff --git a/examples/quickcontrols2/gallery/gallery.pro b/examples/quickcontrols2/gallery/gallery.pro index fbfc3df8..45496a35 100644 --- a/examples/quickcontrols2/gallery/gallery.pro +++ b/examples/quickcontrols2/gallery/gallery.pro @@ -9,6 +9,7 @@ RESOURCES += \ gallery.qml \ qtquickcontrols2.conf \ $$files(images/*.png) \ + $$files(images/+material/*.png) \ $$files(pages/*.qml) target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/gallery diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml index 753a8c00..bead5434 100644 --- a/examples/quickcontrols2/gallery/gallery.qml +++ b/examples/quickcontrols2/gallery/gallery.qml @@ -69,14 +69,21 @@ ApplicationWindow { fillMode: Image.Pad horizontalAlignment: Image.AlignHCenter verticalAlignment: Image.AlignVCenter - source: "qrc:/images/drawer.png" + source: stackView.depth > 1 ? "images/back.png" : "images/drawer.png" + } + onClicked: { + if (stackView.depth > 1) { + stackView.pop() + listView.currentIndex = -1 + } else { + drawer.open() + } } - onClicked: drawer.open() } Label { id: titleLabel - text: "Gallery" + text: listView.currentItem ? listView.currentItem.text : "Gallery" font.pixelSize: 20 elide: Label.ElideRight horizontalAlignment: Qt.AlignHCenter @@ -115,6 +122,7 @@ ApplicationWindow { id: drawer width: Math.min(window.width, window.height) / 3 * 2 height: window.height + dragMargin: stackView.depth > 1 ? 0 : undefined ListView { id: listView @@ -128,8 +136,7 @@ ApplicationWindow { onClicked: { if (listView.currentIndex != index) { listView.currentIndex = index - titleLabel.text = model.title - stackView.replace(model.source) + stackView.push(model.source) } drawer.close() } diff --git a/examples/quickcontrols2/gallery/images/+material/back.png b/examples/quickcontrols2/gallery/images/+material/back.png Binary files differnew file mode 100644 index 00000000..ebc1000f --- /dev/null +++ b/examples/quickcontrols2/gallery/images/+material/back.png diff --git a/examples/quickcontrols2/gallery/images/+material/back@2x.png b/examples/quickcontrols2/gallery/images/+material/back@2x.png Binary files differnew file mode 100644 index 00000000..cf6163c8 --- /dev/null +++ b/examples/quickcontrols2/gallery/images/+material/back@2x.png diff --git a/examples/quickcontrols2/gallery/images/+material/back@3x.png b/examples/quickcontrols2/gallery/images/+material/back@3x.png Binary files differnew file mode 100644 index 00000000..96376a5a --- /dev/null +++ b/examples/quickcontrols2/gallery/images/+material/back@3x.png diff --git a/examples/quickcontrols2/gallery/images/+material/back@4x.png b/examples/quickcontrols2/gallery/images/+material/back@4x.png Binary files differnew file mode 100644 index 00000000..578ac14f --- /dev/null +++ b/examples/quickcontrols2/gallery/images/+material/back@4x.png diff --git a/examples/quickcontrols2/gallery/images/back.png b/examples/quickcontrols2/gallery/images/back.png Binary files differnew file mode 100644 index 00000000..db43e273 --- /dev/null +++ b/examples/quickcontrols2/gallery/images/back.png diff --git a/examples/quickcontrols2/gallery/images/back@2x.png b/examples/quickcontrols2/gallery/images/back@2x.png Binary files differnew file mode 100644 index 00000000..c55ab315 --- /dev/null +++ b/examples/quickcontrols2/gallery/images/back@2x.png diff --git a/examples/quickcontrols2/gallery/images/back@3x.png b/examples/quickcontrols2/gallery/images/back@3x.png Binary files differnew file mode 100644 index 00000000..b228eb87 --- /dev/null +++ b/examples/quickcontrols2/gallery/images/back@3x.png diff --git a/examples/quickcontrols2/gallery/images/back@4x.png b/examples/quickcontrols2/gallery/images/back@4x.png Binary files differnew file mode 100644 index 00000000..dd157e78 --- /dev/null +++ b/examples/quickcontrols2/gallery/images/back@4x.png |