diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-09 16:25:58 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-05-10 11:53:47 +0200 |
commit | 66646dd8c37adb488a79ab274b2396a649674e6d (patch) | |
tree | b0f5ac752a52cec3de1d47692e09295197622dcd /tests/manual | |
parent | da15ea0f3b5805db657f13060c21efa78f10cde2 (diff) | |
parent | d82a17b929dd88fe76258b0f801beaa1b2ee343e (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
.qmake.conf
src/plugins/accessible/quick/quick.pro
src/quick/items/qquickpincharea.cpp
src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
src/quick/scenegraph/qsgthreadedrenderloop.cpp
Manually adjusted for TestHTTPServer constructor change:
tests/auto/quick/qquickimage/tst_qquickimage.cpp
Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/highdpi/fillmodes.qml | 72 | ||||
-rw-r--r-- | tests/manual/highdpi/heart-highdpi@2x.png | bin | 0 -> 20654 bytes | |||
-rw-r--r-- | tests/manual/highdpi/heart-lowdpi.png | bin | 0 -> 15194 bytes | |||
-rw-r--r-- | tests/manual/highdpi/heart.png | bin | 0 -> 15194 bytes | |||
-rw-r--r-- | tests/manual/highdpi/heart@2x.png | bin | 0 -> 20654 bytes | |||
-rw-r--r-- | tests/manual/highdpi/image.qml | 52 | ||||
-rw-r--r-- | tests/manual/highdpi/image2.qml | 64 | ||||
-rw-r--r-- | tests/manual/highdpi/imagesize.qml | 76 | ||||
-rw-r--r-- | tests/manual/highdpi/mirror.qml | 57 | ||||
-rw-r--r-- | tests/manual/highdpi/sourcesize.qml | 76 |
10 files changed, 397 insertions, 0 deletions
diff --git a/tests/manual/highdpi/fillmodes.qml b/tests/manual/highdpi/fillmodes.qml new file mode 100644 index 0000000000..cff2bcc34c --- /dev/null +++ b/tests/manual/highdpi/fillmodes.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 400 + height: 700 + + // the images should have the same display size and appearance on each row. + Column { + anchors.centerIn: parent.Center + Row { + Image { width: 130; height: 70; fillMode: Image.Stretch; source : "heart-lowdpi.png" } + Image { width: 130; height: 70; fillMode: Image.Stretch; source : "heart.png" } + Image { width: 130; height: 70; fillMode: Image.Stretch; source : "heart-highdpi@2x.png" } + } + Row { + Image { width: 130; height: 100; fillMode: Image.PreserveAspectFit; source : "heart-lowdpi.png" } + Image { width: 130; height: 100; fillMode: Image.PreserveAspectFit; source : "heart.png" } + Image { width: 130; height: 100; fillMode: Image.PreserveAspectFit; source : "heart-highdpi@2x.png" } + } + Row { + Image { width: 130; height: 100; fillMode: Image.PreserveAspectCrop; source : "heart-lowdpi.png" } + Image { width: 130; height: 100; fillMode: Image.PreserveAspectCrop; source : "heart.png" } + Image { width: 130; height: 100; fillMode: Image.PreserveAspectCrop; source : "heart-highdpi@2x.png" } + } + Row { + Image { width: 230; height: 200; fillMode: Image.Tile; source : "heart-lowdpi.png" } + Image { width: 230; height: 200; fillMode: Image.Tile; source : "heart.png" } + Image { width: 230; height: 200; fillMode: Image.Tile; source : "heart-highdpi@2x.png" } + } + } +} diff --git a/tests/manual/highdpi/heart-highdpi@2x.png b/tests/manual/highdpi/heart-highdpi@2x.png Binary files differnew file mode 100644 index 0000000000..a7a1ca89a4 --- /dev/null +++ b/tests/manual/highdpi/heart-highdpi@2x.png diff --git a/tests/manual/highdpi/heart-lowdpi.png b/tests/manual/highdpi/heart-lowdpi.png Binary files differnew file mode 100644 index 0000000000..deaec18274 --- /dev/null +++ b/tests/manual/highdpi/heart-lowdpi.png diff --git a/tests/manual/highdpi/heart.png b/tests/manual/highdpi/heart.png Binary files differnew file mode 100644 index 0000000000..deaec18274 --- /dev/null +++ b/tests/manual/highdpi/heart.png diff --git a/tests/manual/highdpi/heart@2x.png b/tests/manual/highdpi/heart@2x.png Binary files differnew file mode 100644 index 0000000000..a7a1ca89a4 --- /dev/null +++ b/tests/manual/highdpi/heart@2x.png diff --git a/tests/manual/highdpi/image.qml b/tests/manual/highdpi/image.qml new file mode 100644 index 0000000000..8deab5c734 --- /dev/null +++ b/tests/manual/highdpi/image.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 400 + height: 400 + + Image { + source : "heart.png" + anchors.centerIn: parent + } +} diff --git a/tests/manual/highdpi/image2.qml b/tests/manual/highdpi/image2.qml new file mode 100644 index 0000000000..b83c8006d8 --- /dev/null +++ b/tests/manual/highdpi/image2.qml @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 400 + height: 400 + + // These images should all have the same visual size: + Row { + anchors.centerIn: parent + // 1X only + Image { + source : "heart-lowdpi.png" + } + // 1X and 2x, switches on screen change. + Image { + source : "heart.png" + } + // 2x only + Image { + source : "heart-highdpi@2x.png" + } + } +} diff --git a/tests/manual/highdpi/imagesize.qml b/tests/manual/highdpi/imagesize.qml new file mode 100644 index 0000000000..ee6719a6ee --- /dev/null +++ b/tests/manual/highdpi/imagesize.qml @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 400 + height: 400 + + Column { + anchors.centerIn: parent.Center + Row { + Image { width: 50; height: 50; fillMode: Image.Stretch; source : "heart-lowdpi.png" } + Image { width: 50; height: 50; fillMode: Image.Stretch; source : "heart.png" } + Image { width: 50; height: 50; fillMode: Image.Stretch; source : "heart-highdpi@2x.png" } + } + Row { + Image { width: 100; height: 100; fillMode: Image.Stretch; source : "heart-lowdpi.png" } + Image { width: 100; height: 100; fillMode: Image.Stretch; source : "heart.png" } + Image { width: 100; height: 100; fillMode: Image.Stretch; source : "heart-highdpi@2x.png" } + } + Row { + Image { width: 150; height: 150; fillMode: Image.Stretch; source : "heart-lowdpi.png" } + Image { width: 150; height: 150; fillMode: Image.Stretch; source : "heart.png" } + Image { width: 150; height: 150; fillMode: Image.Stretch; source : "heart-highdpi@2x.png" } + } + Row { + Image { width: 200; height: 200; fillMode: Image.Stretch; source : "heart-lowdpi.png" } + Image { width: 200; height: 200; fillMode: Image.Stretch; source : "heart.png" } + Image { width: 200; height: 200; fillMode: Image.Stretch; source : "heart-highdpi@2x.png" } + } + Row { + Image { width: 300; height: 300; fillMode: Image.Stretch; source : "heart-lowdpi.png" } + Image { width: 300; height: 300; fillMode: Image.Stretch; source : "heart.png" } + Image { width: 300; height: 300; fillMode: Image.Stretch; source : "heart-highdpi@2x.png" } + } + } +} diff --git a/tests/manual/highdpi/mirror.qml b/tests/manual/highdpi/mirror.qml new file mode 100644 index 0000000000..3a92a9abd4 --- /dev/null +++ b/tests/manual/highdpi/mirror.qml @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 400 + height: 700 + + // the images should have the same display size and appearance on each row. + Column { + anchors.centerIn: parent.Center + Row { + Image { mirror: true; source : "heart-lowdpi.png" } + Image { mirror: true; source : "heart.png" } + Image { mirror: true; source : "heart-highdpi@2x.png" } + } + } +} diff --git a/tests/manual/highdpi/sourcesize.qml b/tests/manual/highdpi/sourcesize.qml new file mode 100644 index 0000000000..64bf8ad86b --- /dev/null +++ b/tests/manual/highdpi/sourcesize.qml @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 400 + height: 400 + + // SourceSize is in device-independent pixels. These images + // should display at the same visual size. + Column { + anchors.centerIn: parent.Center + Row { + + // standard image with no @2x version + Image { + sourceSize.width: 75 + sourceSize.height: 75 + source : "heart-lowdpi.png" + } + + // image with "@2x" version on disk + Image { + sourceSize.width: 75 + sourceSize.height: 75 + source : "heart.png" + } + + // direct use of "@2x" image + Image { + sourceSize.width: 75 + sourceSize.height: 75 + source : "heart-highdpi@2x.png" + } + } + } +} |