2020-05-24 20:54:46 +03:00
|
|
|
import QtQuick 2.0
|
|
|
|
import Sailfish.Silica 1.0
|
|
|
|
|
|
|
|
|
|
|
|
DockedPanel {
|
2020-06-11 15:11:39 +03:00
|
|
|
id: root
|
2020-06-03 08:34:33 +03:00
|
|
|
dock: Dock.Top
|
2020-07-03 11:45:30 +03:00
|
|
|
width: isPortrait ? parent.width : Theme.buttonWidthLarge * 1.5
|
2020-05-24 20:54:46 +03:00
|
|
|
height: content.height
|
2020-07-03 11:45:30 +03:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2020-05-24 20:54:46 +03:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: content
|
|
|
|
color: Theme.highlightBackgroundColor
|
2020-06-03 08:34:33 +03:00
|
|
|
width: root.width
|
2020-06-04 12:17:06 +03:00
|
|
|
height: infoLabel.height + 2 * Theme.paddingMedium
|
2020-05-24 20:54:46 +03:00
|
|
|
|
|
|
|
Label {
|
|
|
|
id: infoLabel
|
|
|
|
text : ""
|
|
|
|
font.family: Theme.fontFamilyHeading
|
|
|
|
font.pixelSize: Theme.fontSizeMedium
|
2020-06-04 12:17:06 +03:00
|
|
|
color: Theme.primaryColor
|
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-11 15:11:39 +03:00
|
|
|
}
|
2020-05-24 20:54:46 +03:00
|
|
|
}
|
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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|