BookDetailPage: Notices non istanziabile in questa Silica, sostituito con banner Label+Timer
This commit is contained in:
@@ -105,8 +105,22 @@ Page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Notices {
|
// banner di conferma download (Notices non è istanziabile in questa Silica)
|
||||||
id: notices
|
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) {
|
function formatSize(bytes) {
|
||||||
@@ -182,8 +196,10 @@ Page {
|
|||||||
page.downloading = false
|
page.downloading = false
|
||||||
if (ok) {
|
if (ok) {
|
||||||
page.downloadError = ""
|
page.downloadError = ""
|
||||||
notices.show("Salvato in " + path)
|
page.downloadNotice = "Salvato in " + path
|
||||||
|
hideNoticeTimer.restart()
|
||||||
} else {
|
} else {
|
||||||
|
page.downloadNotice = ""
|
||||||
page.downloadError = "Errore: " + error
|
page.downloadError = "Errore: " + error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user