Changeset View
Changeset View
Standalone View
Standalone View
mobile/app/package/contents/ui/MainView.qml
Show All 24 Lines | |||||
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 | ||
30 | bottomPadding: 0 | 30 | bottomPadding: 0 | ||
31 | 31 | | |||
32 | actions.main: Kirigami.Action { | 32 | actions.main: Kirigami.Action { | ||
33 | iconName: "bookmarks-organize" | 33 | icon.name: pageArea.page.bookmarked ? "bookmark-remove" : "bookmarks-organize" | ||
34 | checkable: true | 34 | checkable: true | ||
35 | onCheckedChanged: pageArea.page.bookmarked = checked; | 35 | onCheckedChanged: pageArea.page.bookmarked = checked | ||
36 | text: pageArea.page.bookmarked ? i18n("Remove bookmark") : i18n("Bookmark this page") | ||||
36 | } | 37 | } | ||
37 | 38 | | |||
38 | Okular.DocumentView { | 39 | Okular.DocumentView { | ||
39 | id: pageArea | 40 | id: pageArea | ||
40 | anchors.fill: parent | 41 | anchors.fill: parent | ||
41 | 42 | | |||
42 | onPageChanged: { | 43 | onPageChanged: { | ||
43 | bookmarkConnection.target = page | 44 | bookmarkConnection.target = page | ||
Show All 12 Lines | 55 | QQC2.ProgressBar { | |||
56 | z: 99 | 57 | z: 99 | ||
57 | visible: applicationWindow().controlsVisible | 58 | visible: applicationWindow().controlsVisible | ||
58 | height: Kirigami.Units.smallSpacing | 59 | height: Kirigami.Units.smallSpacing | ||
59 | anchors { | 60 | anchors { | ||
60 | left: parent.left | 61 | left: parent.left | ||
61 | right: parent.right | 62 | right: parent.right | ||
62 | bottom: parent.bottom | 63 | bottom: parent.bottom | ||
63 | } | 64 | } | ||
64 | value: documentItem.pageCount != 0 ? ((documentItem.currentPage+1) / documentItem.pageCount) : 0 | 65 | value: documentItem.pageCount !== 0 ? ((documentItem.currentPage+1) / documentItem.pageCount) : 0 | ||
65 | } | 66 | } | ||
66 | } | 67 | } |