2020-05-24 20:54:46 +03:00
|
|
|
import QtQuick 2.0
|
|
|
|
import Sailfish.Silica 1.0
|
|
|
|
|
|
|
|
|
|
|
|
DockedPanel {
|
|
|
|
id: root
|
2020-06-03 08:34:33 +03:00
|
|
|
dock: Dock.Top
|
2020-05-25 18:54:02 +03:00
|
|
|
width: parent.width
|
2020-05-24 20:54:46 +03:00
|
|
|
height: content.height
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: content
|
|
|
|
color: Theme.highlightBackgroundColor
|
2020-06-03 08:34:33 +03:00
|
|
|
width: root.width
|
|
|
|
height: infoLabel.height + 3*Theme.paddingMedium
|
2020-05-24 20:54:46 +03:00
|
|
|
|
|
|
|
Label {
|
|
|
|
id: infoLabel
|
|
|
|
text : ""
|
|
|
|
font.family: Theme.fontFamilyHeading
|
|
|
|
font.pixelSize: Theme.fontSizeMedium
|
2020-06-03 08:34:33 +03:00
|
|
|
color: Theme.highlightColor
|
2020-05-24 20:54:46 +03:00
|
|
|
wrapMode: Text.WrapAnywhere
|
2020-06-03 08:34:33 +03:00
|
|
|
width: parent.width
|
2020-05-24 20:54:46 +03:00
|
|
|
anchors {
|
|
|
|
left: parent.left
|
2020-05-25 18:54:02 +03:00
|
|
|
leftMargin: Theme.horizontalPageMargin*2
|
2020-05-24 20:54:46 +03:00
|
|
|
right: parent.right
|
|
|
|
rightMargin: Theme.horizontalPageMargin
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
}
|
2020-06-03 08:34:33 +03:00
|
|
|
|
2020-05-24 20:54:46 +03:00
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
|
|
|
root.hide()
|
|
|
|
autoClose.stop()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function showText(text) {
|
|
|
|
infoLabel.text = text
|
|
|
|
root.show()
|
|
|
|
autoClose.start()
|
|
|
|
}
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
id: autoClose
|
2020-05-29 21:05:05 +03:00
|
|
|
interval: 4500
|
2020-05-24 20:54:46 +03:00
|
|
|
running: false
|
|
|
|
onTriggered: {
|
|
|
|
root.hide()
|
|
|
|
stop()
|
|
|
|
}
|
|
|
|
}
|
2020-05-29 21:05:05 +03:00
|
|
|
|
2020-05-24 20:54:46 +03:00
|
|
|
}
|