[app] Made it easier to cancel book loading

Also, show the book title at the top of the loading screen
This commit is contained in:
Slava Monich 2015-09-12 19:37:02 +03:00
parent 9f7c751e8d
commit e00e5624f9
5 changed files with 45 additions and 0 deletions

View file

@ -187,6 +187,21 @@ SilicaFlickable {
}
}
BooksTitleLabel {
id: titleLabel
anchors {
top: parent.top
left: parent.left
right: parent.right
leftMargin: bookModel.leftMargin
rightMargin: bookModel.rightMargin
}
text: bookModel.title
height: Theme.itemSizeExtraSmall
color: Theme.highlightColor
opacity: _loading ? 0.6 : 0
}
BusyIndicator {
id: busyIndicator
anchors.centerIn: parent
@ -214,4 +229,18 @@ SilicaFlickable {
Behavior on opacity { FadeAnimation {} }
text: bookModel ? _loadingTextLabel[bookModel.resetReason] : ""
}
Button {
//% "Cancel"
text: qsTrId("book-view-cancel-loading")
preferredWidth: Theme.buttonWidthMedium
height: Theme.itemSizeLarge
anchors {
bottom: parent.bottom
horizontalCenter: parent.horizontalCenter
}
onClicked: root.closeBook()
opacity: enabled ? 1.0 : 0.0
Behavior on opacity { FadeAnimation { } }
}
}

View file

@ -23,6 +23,10 @@
<source>Applying smaller fonts...</source>
<translation>Vaihdetaan pienempiin fontteihin...</translation>
</message>
<message id="book-view-cancel-loading">
<source>Cancel</source>
<translation>Peru</translation>
</message>
<message id="shelf-view-about-to-delete-all">
<source>Deleting all books</source>
<translation>Poistetaan kaikki kirjat</translation>

View file

@ -23,6 +23,10 @@
<source>Applying smaller fonts...</source>
<translation>Уменьшаем шрифты...</translation>
</message>
<message id="book-view-cancel-loading">
<source>Cancel</source>
<translation>Отставить</translation>
</message>
<message id="shelf-view-about-to-delete-all">
<source>Deleting all books</source>
<translation>Удаляем все книги</translation>

View file

@ -23,6 +23,10 @@
<source>Applying smaller fonts...</source>
<translation type="unfinished">Tillämpa mindre typsnitt...</translation>
</message>
<message id="book-view-cancel-loading">
<source>Cancel</source>
<translation>Avbryt</translation>
</message>
<message id="shelf-view-about-to-delete-all">
<source>Deleting all books</source>
<translation>Tar bort alla böcker</translation>

View file

@ -23,6 +23,10 @@
<source>Applying smaller fonts...</source>
<translation>Applying smaller fonts...</translation>
</message>
<message id="book-view-cancel-loading">
<source>Cancel</source>
<translation>Cancel</translation>
</message>
<message id="shelf-view-about-to-delete-all">
<source>Deleting all books</source>
<translation>Deleting all books</translation>