From 5bb0180645ce55c28eb8b923bee61c74de3b9c0e Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 28 Mar 2012 18:46:31 +1000 Subject: Scattered example fixes Some using of pixel size, some moving an image because individual sub-examples shouldn't depend on the shared folder. Change-Id: If0f66f805f5fc9bcbf9b870274adac404466ec08 Reviewed-by: Yann Bodson --- .../imageelements/content/BorderImageSelector.qml | 4 +- examples/quick/imageelements/content/arrow.png | Bin 0 -> 404 bytes .../modelviews/listview/content/SmallText.qml | 46 +++++++++++++++++++++ .../modelviews/listview/content/TextButton.qml | 8 ++-- .../modelviews/listview/expandingdelegates.qml | 8 ++-- examples/quick/modelviews/listview/highlight.qml | 6 +-- 6 files changed, 58 insertions(+), 14 deletions(-) create mode 100644 examples/quick/imageelements/content/arrow.png create mode 100644 examples/quick/modelviews/listview/content/SmallText.qml (limited to 'examples') diff --git a/examples/quick/imageelements/content/BorderImageSelector.qml b/examples/quick/imageelements/content/BorderImageSelector.qml index f3a534b3cd..8084b512fd 100644 --- a/examples/quick/imageelements/content/BorderImageSelector.qml +++ b/examples/quick/imageelements/content/BorderImageSelector.qml @@ -56,7 +56,7 @@ Item { curIdx += steps; } Image { - source: "../../../shared/images/back.png" + source: "arrow.png" MouseArea{ anchors.fill: parent onClicked: selector.advance(-1) @@ -68,7 +68,7 @@ Item { Behavior on opacity {NumberAnimation{}} } Image { - source: "../../../shared/images/back.png" + source: "arrow.png" mirror: true MouseArea{ anchors.fill: parent diff --git a/examples/quick/imageelements/content/arrow.png b/examples/quick/imageelements/content/arrow.png new file mode 100644 index 0000000000..506ac42fcf Binary files /dev/null and b/examples/quick/imageelements/content/arrow.png differ diff --git a/examples/quick/modelviews/listview/content/SmallText.qml b/examples/quick/modelviews/listview/content/SmallText.qml new file mode 100644 index 0000000000..e27446827f --- /dev/null +++ b/examples/quick/modelviews/listview/content/SmallText.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Text { + font.pixelSize: 12 +} + diff --git a/examples/quick/modelviews/listview/content/TextButton.qml b/examples/quick/modelviews/listview/content/TextButton.qml index 980ee21553..9f0e673f8a 100644 --- a/examples/quick/modelviews/listview/content/TextButton.qml +++ b/examples/quick/modelviews/listview/content/TextButton.qml @@ -52,12 +52,10 @@ Rectangle { radius: 10 gradient: Gradient { - GradientStop { id: gradientStop; position: 0.0; color: palette.light } - GradientStop { position: 1.0; color: palette.button } + GradientStop { id: gradientStop; position: 0.0; color: "#eeeeee" } + GradientStop { position: 1.0; color: "#888888" } } - SystemPalette { id: palette } - MouseArea { id: mouseArea anchors.fill: parent @@ -72,7 +70,7 @@ Rectangle { states: State { name: "pressed" when: mouseArea.pressed - PropertyChanges { target: gradientStop; color: palette.dark } + PropertyChanges { target: gradientStop; color: "#333333" } } } diff --git a/examples/quick/modelviews/listview/expandingdelegates.qml b/examples/quick/modelviews/listview/expandingdelegates.qml index 43a9662422..02d5edc1d1 100644 --- a/examples/quick/modelviews/listview/expandingdelegates.qml +++ b/examples/quick/modelviews/listview/expandingdelegates.qml @@ -106,13 +106,13 @@ Rectangle { font.bold: true; font.pointSize: 16 } - Text { + SmallText { text: "Ingredients" - font.pointSize: 12; font.bold: true + font.bold: true opacity: recipe.detailsOpacity } - Text { + SmallText { text: ingredients wrapMode: Text.WordWrap width: parent.width @@ -127,7 +127,7 @@ Rectangle { anchors { top: topLayout.bottom; topMargin: 10; bottom: parent.bottom; bottomMargin: 10 } opacity: recipe.detailsOpacity - Text { + SmallText { id: methodTitle anchors.top: parent.top text: "Method" diff --git a/examples/quick/modelviews/listview/highlight.qml b/examples/quick/modelviews/listview/highlight.qml index 2dca1f4b18..239a946523 100644 --- a/examples/quick/modelviews/listview/highlight.qml +++ b/examples/quick/modelviews/listview/highlight.qml @@ -56,9 +56,9 @@ Rectangle { id: wrapper width: 200; height: 55 Column { - Text { text: 'Name: ' + name } - Text { text: 'Type: ' + type } - Text { text: 'Age: ' + age } + SmallText { text: 'Name: ' + name } + SmallText { text: 'Type: ' + type } + SmallText { text: 'Age: ' + age } } // indent the item if it is the current item states: State { -- cgit v1.2.3