Verified Commit cff01c10 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Fix bookmark action

Summary: Adds tootip, different icons depending on checked state and fixed functionality

Test Plan:
- Open a document
- click bookmark action
- the bookmarked page should appear in the bookmarks tab of the contextDrawer

Reviewers: #okular, #plasma:_mobile, ngraham

Reviewed By: ngraham

Subscribers: ngraham, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D22904
parent 0dd54196
......@@ -30,9 +30,10 @@ Kirigami.Page {
bottomPadding: 0
actions.main: Kirigami.Action {
iconName: "bookmarks-organize"
icon.name: pageArea.page.bookmarked ? "bookmark-remove" : "bookmarks-organize"
checkable: true
onCheckedChanged: pageArea.page.bookmarked = checked;
onCheckedChanged: pageArea.page.bookmarked = checked
text: pageArea.page.bookmarked ? i18n("Remove bookmark") : i18n("Bookmark this page")
}
Okular.DocumentView {
......@@ -61,6 +62,6 @@ Kirigami.Page {
right: parent.right
bottom: parent.bottom
}
value: documentItem.pageCount != 0 ? ((documentItem.currentPage+1) / documentItem.pageCount) : 0
value: documentItem.pageCount !== 0 ? ((documentItem.currentPage+1) / documentItem.pageCount) : 0
}
}
......@@ -23,7 +23,7 @@ import org.kde.okular 2.0 as Okular
import org.kde.kirigami 2.0 as Kirigami
import org.kde.okular.app 2.0
Kirigami.AbstractApplicationWindow {
Kirigami.ApplicationWindow {
id: fileBrowserRoot
visible: true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment