Skip to content

Commit

Permalink
Fixed page number in pdf files staying under the page
Browse files Browse the repository at this point in the history
  • Loading branch information
TronFortyTwo committed Mar 5, 2021
1 parent 025ddf1 commit b61360c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion po/sturmreader.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sturmreader.emanuelesorce\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2021-03-04 12:26+0000\n"
"POT-Creation-Date: 2021-03-05 16:51+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
26 changes: 14 additions & 12 deletions ui/qml/BookPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -368,18 +368,6 @@ Page {
running: opacity != 0
}

Label {
visible: pictureBook
text: "" + (pdf_pageNumber == 0 ? "-" : pdf_pageNumber) + "/" + (pdf_numberOfPages == 0 ? "-" : pdf_numberOfPages)
anchors.bottom: parent.bottom
anchors.bottomMargin: scaling.dp(5)
anchors.rightMargin: scaling.dp(5)
anchors.right: parent.right
font.pixelSize: scaling.dp(12)
// TODO: page number is not visible if pdf page is of the same color on landscape
color: bookSettings.infoColor
}

Browser {
id: bookWebView
anchors.fill: parent
Expand All @@ -406,6 +394,20 @@ Page {
}
}

// Below browser so that it get drawn over it
Label {
visible: pictureBook
text: "" + (pdf_pageNumber == 0 ? "-" : pdf_pageNumber) + "/" + (pdf_numberOfPages == 0 ? "-" : pdf_numberOfPages)
anchors.bottom: parent.bottom
anchors.bottomMargin: scaling.dp(5)
anchors.rightMargin: scaling.dp(5)
anchors.right: parent.right
font.pixelSize: scaling.dp(12)
// TODO: page number is not visible if pdf page is of the same color on landscape
color: bookSettings.infoColor
}

// parse messages the html side running in the browser send us using the server.
function parseApiCall( message ) {
console.log("Book: " + message);

Expand Down

0 comments on commit b61360c

Please sign in to comment.