3 import "common" as Common
6 x: parent.width; /*height: parent.height;*/
9 property alias zoomEnabled: slider.visible;
10 property alias value: slider.value;
11 //anchors.top: parent.top; anchors.bottom: parent.bottom;
16 //anchors.fill: screen;
17 height: parent.height;
19 contentWidth: webView.width*webView.scale; //Math.max(screen.width,webView.width*webView.scale)
20 contentHeight: Math.max(screen.height,webView.height*webView.scale)
21 //contentWidth: childrenRect.width; contentHeight: childrenRect.height
23 flickDeceleration: 1000;
27 url: articleDisplay.url;
28 preferredWidth: flickable.width
29 preferredHeight: flickable.height
31 transformOrigin: Item.TopLeft
33 settings.defaultFontSize: 24
38 id: slider; visible: false
41 property real prevScale: 1
43 bottom: parent.bottom; bottomMargin: 65
44 left: parent.left; leftMargin: 25
45 right: parent.right; rightMargin: 25
48 if (webView.width * value > flickable.width) {
49 var xoff = (flickable.width/2 + flickable.contentX) * value / prevScale;
50 flickable.contentX = xoff - flickable.width/2;
52 if (webView.height * value > flickable.height) {
53 var yoff = (flickable.height/2 + flickable.contentY) * value / prevScale;
54 flickable.contentY = yoff - flickable.height/2;
58 Component.onCompleted: {value=0; value=1; }