diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-03-17 23:10:37 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-03-23 03:44:02 (GMT) |
commit | a83bed9e2ee062839af072745359038ee499ab43 (patch) | |
tree | 064ad21d01a9aa512a2b1b639a83e346e8502662 /demos/declarative/photoviewer | |
parent | 85145bcde787f15175e15ed9219be57d24a3ce61 (diff) | |
download | Qt-a83bed9e2ee062839af072745359038ee499ab43.zip Qt-a83bed9e2ee062839af072745359038ee499ab43.tar.gz Qt-a83bed9e2ee062839af072745359038ee499ab43.tar.bz2 |
Small photoviewer improvements
Diffstat (limited to 'demos/declarative/photoviewer')
3 files changed, 13 insertions, 5 deletions
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml index fca7232..eb6d1c0 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml @@ -50,8 +50,7 @@ Component { Tag { anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom - frontLabel: tag; backLabel: "Delete"; rotation: Math.random() * (2 * 6 + 1) - 6 - flipped: mainWindow.editMode + frontLabel: tag; backLabel: "Delete"; flipped: mainWindow.editMode } MouseArea { @@ -77,7 +76,7 @@ Component { PropertyChanges { target: photosGridView; interactive: false } PropertyChanges { target: photosListView; interactive: true } PropertyChanges { target: photosShade; opacity: 1 } - PropertyChanges { target: backButton; y: -backTag.height - 8 } + PropertyChanges { target: backButton; y: -backButton.height - 8 } } ] diff --git a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml index fb28314..cdf86af 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml @@ -4,6 +4,7 @@ Item { id: container property alias label: labelText.text + property string tint: "" signal clicked width: labelText.width + 70 ; height: labelText.height + 18 @@ -16,6 +17,11 @@ Item { Image { anchors.fill: parent; source: "images/cardboard.png"; smooth: true } + Rectangle { + anchors.fill: container; color: container.tint; visible: container.tint != "" + opacity: 0.1; smooth: true + } + Text { id: labelText; font.pixelSize: 15; anchors.centerIn: parent; smooth: true } MouseArea { diff --git a/demos/declarative/photoviewer/PhotoViewerCore/Tag.qml b/demos/declarative/photoviewer/PhotoViewerCore/Tag.qml index d32fcd0..438bd7c 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/Tag.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/Tag.qml @@ -7,18 +7,21 @@ Flipable { property alias backLabel: backButton.label property int angle: 0 + property int randomAngle: Math.random() * (2 * 6 + 1) - 6 property bool flipped: false signal frontClicked signal backClicked front: Button { - id: frontButton; anchors.centerIn: parent; anchors.verticalCenterOffset: -20 + id: frontButton; rotation: flipable.randomAngle + anchors { centerIn: parent; verticalCenterOffset: -20 } onClicked: flipable.frontClicked() } back: Button { - id: backButton; anchors.centerIn: parent; anchors.verticalCenterOffset: -20 + id: backButton; tint: "red" + anchors { centerIn: parent; verticalCenterOffset: -20 } onClicked: flipable.backClicked() } |