← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~verzegnassi-stefano/ubuntu-docviewer-app/loview-partsview-dropshadow into lp:ubuntu-docviewer-app

 

Stefano Verzegnassi has proposed merging lp:~verzegnassi-stefano/ubuntu-docviewer-app/loview-partsview-dropshadow into lp:ubuntu-docviewer-app.

Commit message:
[loview] Added drop shadow effect to partsview thumbnails

Requested reviews:
  Ubuntu Document Viewer Developers (ubuntu-docviewer-dev)

For more details, see:
https://code.launchpad.net/~verzegnassi-stefano/ubuntu-docviewer-app/loview-partsview-dropshadow/+merge/282868

[loview] Added drop shadow effect to partsview thumbnails
-- 
Your team Ubuntu Document Viewer Developers is requested to review the proposed merge of lp:~verzegnassi-stefano/ubuntu-docviewer-app/loview-partsview-dropshadow into lp:ubuntu-docviewer-app.
=== modified file 'src/app/qml/loView/PartsView.qml'
--- src/app/qml/loView/PartsView.qml	2016-01-08 16:26:46 +0000
+++ src/app/qml/loView/PartsView.qml	2016-01-17 12:11:00 +0000
@@ -84,14 +84,28 @@
                 anchors.fill: parent
 
                 /* UITK 1.3 specs: Slot B */
-                Image {
+                Item {
                     SlotsLayout.position: SlotsLayout.Leading
                     height: parent.height; width: height
-                    fillMode: Image.PreserveAspectFit
-                    // Do not store a cache of the thumbnail, so that we don't show
-                    // thumbnails of a previously loaded document.
-                    cache: true // TODO PLAY WITH IT
-                    source: model.thumbnail
+                    BorderImage {
+                        anchors {
+                            centerIn: parent
+                            verticalCenterOffset: units.gu(0.25)
+                            horizontalCenterOffset: units.gu(0.25)
+                        }
+                        width: vThumbnail.paintedWidth + units.gu(1.5)
+                        height: vThumbnail.paintedHeight + units.gu(1.5)
+                        source: "graphics/dropshadow.sci"
+                    }
+                    Image {
+                        id: vThumbnail
+                        anchors.fill: parent
+                        fillMode: Image.PreserveAspectFit
+                        // Do not store a cache of the thumbnail, so that we don't show
+                        // thumbnails of a previously loaded document.
+                        cache: true // TODO PLAY WITH IT
+                        source: model.thumbnail
+                    }
                 }
 
                 /* UITK 1.3 specs: Slot A */
@@ -139,14 +153,28 @@
                 }
                 spacing: units.gu(0.5)
 
-                Image {
+                Item {
                     Layout.fillWidth: true
                     Layout.preferredHeight: width
-                    fillMode: Image.PreserveAspectFit
-                    // Do not store a cache of the thumbnail, so that we don't show
-                    // thumbnails of a previously loaded document.
-                    cache: true // TODO PLAY WITH IT
-                    source: model.thumbnail
+                    BorderImage {
+                        anchors {
+                            centerIn: parent
+                            verticalCenterOffset: units.gu(0.25)
+                            horizontalCenterOffset: units.gu(0.25)
+                        }
+                        width: hThumbnail.paintedWidth + units.gu(1.5)
+                        height: hThumbnail.paintedHeight + units.gu(1.5)
+                        source: "graphics/dropshadow.sci"
+                    }
+                    Image {
+                        id: hThumbnail
+                        anchors.fill: parent
+                        fillMode: Image.PreserveAspectFit
+                        // Do not store a cache of the thumbnail, so that we don't show
+                        // thumbnails of a previously loaded document.
+                        cache: true // TODO PLAY WITH IT
+                        source: model.thumbnail
+                    }
                 }
 
                 Label {

=== added file 'src/app/qml/loView/graphics/dropshadow@xxxxxx'
Binary files src/app/qml/loView/graphics/dropshadow@xxxxxx	1970-01-01 00:00:00 +0000 and src/app/qml/loView/graphics/dropshadow@xxxxxx	2016-01-17 12:11:00 +0000 differ
=== added file 'src/app/qml/loView/graphics/dropshadow@xxxxxx'
--- src/app/qml/loView/graphics/dropshadow@xxxxxx	1970-01-01 00:00:00 +0000
+++ src/app/qml/loView/graphics/dropshadow@xxxxxx	2016-01-17 12:11:00 +0000
@@ -0,0 +1,5 @@
+border.left: 27
+border.top: 27
+border.bottom: 27
+border.right: 27
+source: dropshadow@xxxxxx


Follow ups