summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Martin <notmart@gmail.com>2016-05-13 14:17:26 (GMT)
committerMarco Martin <notmart@gmail.com>2016-05-13 14:17:26 (GMT)
commit6fe6e884d1b4133e92e35dc34fb3db71e1c5d6b7 (patch)
treecca4d6d3ed74d70d1a6db0d72b46f19badc098e6
parenteb1f73800e83b11e4a5ae93ac069893aa88f0eaa (diff)
make sure horiz scrollbar is off when not needed
size the page correctly to not have the horizontal scrollbar when not needed, and make sure the flickable is not interactive, as flicking is managed by hand with a mousearea
-rw-r--r--mobile/components/DocumentView.qml16
1 files changed, 9 insertions, 7 deletions
diff --git a/mobile/components/DocumentView.qml b/mobile/components/DocumentView.qml
index 4efbadd..5cc2086 100644
--- a/mobile/components/DocumentView.qml
+++ b/mobile/components/DocumentView.qml
@@ -33,15 +33,17 @@ QtControls.ScrollView {
property DocumentItem document
property PageItem page: mouseArea.currPageDelegate.pageItem
signal clicked
-
- onWidthChanged: resizeTimer.restart()
- onHeightChanged: resizeTimer.restart()
+
+ //NOTE: on some themes it tries to set the flickable to interactive
+ //but we need it always non interactive as we need to manage
+ //dragging by ourselves
+ Component.onCompleted: flick.interactive = false
Flickable {
id: flick
- anchors.fill: parent
+ interactive: false
+ onWidthChanged: resizeTimer.restart()
+ onHeightChanged: resizeTimer.restart()
- clip: true
-
Component.onCompleted: {
flick.contentWidth = flick.width
flick.contentHeight = flick.width / mouseArea.currPageDelegate.pageRatio
@@ -248,4 +250,4 @@ QtControls.ScrollView {
}
}
}
-} \ No newline at end of file
+}