~verzegnassi-stefano/+junk/docviewer-tmp-001

« back to all changes in this revision

Viewing changes to src/app/qml/PdfPage.qml

  • Committer: Tarmac
  • Author(s): David Planella, Daniel Holbach, Fabio Colella, Stefano Verzegnassi, Arto Jalkanen
  • Date: 2014-10-29 07:39:08 UTC
  • mfrom: (31.1.22 add-plugin)
  • Revision ID: tarmac-20141029073908-8s6r18syexjo37ga
Adds the file plugin to the source tree.

Approved by Stefano Verzegnassi, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.3
 
2
import Ubuntu.Components 1.1
 
3
 
 
4
Image
 
5
{
 
6
 
 
7
    property double fixedWidth
 
8
 
 
9
    id: imagePage
 
10
    asynchronous: true
 
11
    width: parent.width
 
12
    sourceSize.width: fixedWidth
 
13
    fillMode: Image.PreserveAspectCrop
 
14
    source: "image://poppler/page/1"
 
15
 
 
16
    Connections {
 
17
        target: parent
 
18
 
 
19
        onShouldReloadImgChanged: {
 
20
            if (parent.shouldReloadImg)
 
21
            {
 
22
                fixedWidth = parent.width
 
23
            }
 
24
        }
 
25
    }
 
26
 
 
27
    Component.onCompleted: {
 
28
        fixedWidth = parent.width
 
29
    }
 
30
}