Review: Needs Fixing It works well, just move the header states outside the component.
Diff comments: > > === added file 'src/app/qml/loView/LOViewPage.qml' > --- src/app/qml/loView/LOViewPage.qml 1970-01-01 00:00:00 +0000 > +++ src/app/qml/loView/LOViewPage.qml 2015-09-19 14:21:26 +0000 > @@ -0,0 +1,77 @@ > +/* > + * Copyright (C) 2013-2015 Canonical, Ltd. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; version 3. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program. If not, see <http://www.gnu.org/licenses/>. > + */ > + > +import QtQuick 2.3 > +import Ubuntu.Components 1.1 > +import DocumentViewer.LibreOffice 1.0 as LO > + > +import "../common/utils.js" as Utils > +import "../upstreamComponents" > + > +Page { > + id: loPage > + title: Utils.getNameOfFile(file.path); > + > + // Disable header auto-hide. > + flickable: null > + > + Loader { > + id: contentLoader > + > + asynchronous: true > + anchors.fill: parent > + sourceComponent: loPageContentComponent > + } > + > + ActivityIndicator { > + running: contentLoader.status != Loader.Ready > + visible: running > + anchors.centerIn: parent > + } > + > + Component { > + id: loPageContentComponent > + > + Item { > + property alias loDocument: loView.document > + > + LO.Viewer { > + id: loView > + objectName: "loView" > + anchors.fill: parent > + > + clip: true > + documentPath: file.path > + > + Component.onCompleted: { > + // WORKAROUND: Fix for wrong grid unit size > + flickDeceleration = 1500 * units.gridUnit / 8 > + maximumFlickVelocity = 2500 * units.gridUnit / 8 > + } > + } > + > + Scrollbar { flickableItem: loView } > + Scrollbar { flickableItem: loView; align: Qt.AlignBottom } > + > + // *** HEADER *** Header states should stay outside the component. > + state: "default" > + states: LOViewDefaultHeader { > + name: "default" > + targetPage: loPage > + } > + } > + } > +} -- https://code.launchpad.net/~mrqtros/ubuntu-docviewer-app/ubuntu-docviewer-app-async-lok-loading/+merge/271737 Your team Ubuntu Document Viewer Developers is subscribed to branch lp:ubuntu-docviewer-app/reboot. -- Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers More help : https://help.launchpad.net/ListHelp