Changeset View
Changeset View
Standalone View
Standalone View
mobile/app/package/contents/ui/MainView.qml
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public | 14 | * You should have received a copy of the GNU General Public | ||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.1 | 20 | import QtQuick 2.1 | ||
21 | import QtQuick.Controls 1.3 | 21 | import QtQuick.Controls 2.3 as QQC2 | ||
22 | import org.kde.okular 2.0 as Okular | 22 | import org.kde.okular 2.0 as Okular | ||
23 | import org.kde.kirigami 2.0 as Kirigami | 23 | import org.kde.kirigami 2.0 as Kirigami | ||
24 | 24 | | |||
25 | Kirigami.Page { | 25 | Kirigami.Page { | ||
26 | property alias document: pageArea.document | 26 | property alias document: pageArea.document | ||
27 | leftPadding: 0 | 27 | leftPadding: 0 | ||
28 | topPadding: 0 | 28 | topPadding: 0 | ||
29 | rightPadding: 0 | 29 | rightPadding: 0 | ||
Show All 16 Lines | 38 | Okular.DocumentView { | |||
46 | onClicked: fileBrowserRoot.controlsVisible = !fileBrowserRoot.controlsVisible | 46 | onClicked: fileBrowserRoot.controlsVisible = !fileBrowserRoot.controlsVisible | ||
47 | } | 47 | } | ||
48 | 48 | | |||
49 | Connections { | 49 | Connections { | ||
50 | id: bookmarkConnection | 50 | id: bookmarkConnection | ||
51 | target: pageArea.page | 51 | target: pageArea.page | ||
52 | onBookmarkedChanged: actions.main.checked = pageArea.page.bookmarked | 52 | onBookmarkedChanged: actions.main.checked = pageArea.page.bookmarked | ||
53 | } | 53 | } | ||
54 | ProgressBar { | 54 | QQC2.ProgressBar { | ||
55 | id: bar | 55 | id: bar | ||
56 | z: 99 | 56 | z: 99 | ||
57 | visible: applicationWindow().controlsVisible | 57 | visible: applicationWindow().controlsVisible | ||
58 | height: Kirigami.Units.smallSpacing | 58 | height: Kirigami.Units.smallSpacing | ||
59 | anchors { | 59 | anchors { | ||
60 | left: parent.left | 60 | left: parent.left | ||
61 | right: parent.right | 61 | right: parent.right | ||
62 | bottom: parent.bottom | 62 | bottom: parent.bottom | ||
63 | } | 63 | } | ||
64 | value: documentItem.pageCount != 0 ? ((documentItem.currentPage+1) / documentItem.pageCount) : 0 | 64 | value: documentItem.pageCount != 0 ? ((documentItem.currentPage+1) / documentItem.pageCount) : 0 | ||
65 | } | 65 | } | ||
66 | } | 66 | } |