2 import Sailfish.Silica 1.0
3 import "functions.js" as Functions
8 allowedOrientations: Orientation.All
9 property string path: ""
14 contentHeight: column.height
15 VerticalScrollDecorator { flickable: flickable }
19 anchors.left: parent.left
20 anchors.right: parent.right
21 anchors.leftMargin: Theme.paddingLarge
22 anchors.rightMargin: Theme.paddingLarge
24 PageHeader { title: Functions.lastPartOfPath(page.path) }
28 textFormat: Text.PlainText
30 wrapMode: Text.WrapAnywhere
31 font.pixelSize: Theme.fontSizeTiny
32 font.family: "Monospace"
33 color: Theme.highlightColor
34 visible: page.orientation === Orientation.Portrait
38 textFormat: Text.PlainText
40 wrapMode: Text.WrapAnywhere
41 font.pixelSize: Theme.fontSizeTiny
42 font.family: "Monospace"
43 color: Theme.highlightColor
44 visible: page.orientation === Orientation.Landscape
48 visible: message.text !== ""
54 // show medium size if there is no portrait (or landscape text)
55 // in that case, this message becomes main message
56 font.pixelSize: portraitText.text === "" ? Theme.fontSizeMedium : Theme.fontSizeTiny
57 color: portraitText.text === "" ? Theme.highlightColor : Theme.secondaryColor
58 horizontalAlignment: Text.AlignHCenter
59 visible: message.text !== ""
63 visible: message.text !== ""
70 if (status === PageStatus.Activating) {
71 // reading file returns three texts, message, portrait and landscape texts
72 var txts = engine.readFile(page.path);
73 message.text = txts[0];
74 portraitText.text = txts[1];
75 landscapeText.text = txts[2];