BookDetailPage: Notices non istanziabile in questa Silica, sostituito con banner Label+Timer
This commit is contained in:
@@ -105,8 +105,22 @@ Page {
|
||||
}
|
||||
}
|
||||
|
||||
Notices {
|
||||
id: notices
|
||||
// banner di conferma download (Notices non è istanziabile in questa Silica)
|
||||
property string downloadNotice: ""
|
||||
|
||||
Label {
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
text: page.downloadNotice
|
||||
color: Theme.highlightColor
|
||||
wrapMode: Text.Wrap
|
||||
visible: text.length > 0
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: hideNoticeTimer
|
||||
interval: 4000
|
||||
onTriggered: page.downloadNotice = ""
|
||||
}
|
||||
|
||||
function formatSize(bytes) {
|
||||
@@ -182,8 +196,10 @@ Page {
|
||||
page.downloading = false
|
||||
if (ok) {
|
||||
page.downloadError = ""
|
||||
notices.show("Salvato in " + path)
|
||||
page.downloadNotice = "Salvato in " + path
|
||||
hideNoticeTimer.restart()
|
||||
} else {
|
||||
page.downloadNotice = ""
|
||||
page.downloadError = "Errore: " + error
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user