Launcher FirstRun: add ‘scroll to bottom’ hint
This commit is contained in:
parent
55fc3d99ae
commit
e62c64859c
4 changed files with 43 additions and 0 deletions
BIN
src/GUI/assets/icons8-scroll-down-50.png
Normal file
BIN
src/GUI/assets/icons8-scroll-down-50.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 939 B |
|
@ -155,4 +155,12 @@ Item {
|
||||||
|
|
||||||
} // of Flickable
|
} // of Flickable
|
||||||
|
|
||||||
|
ScrollToBottomHint {
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.margins: Style.strutSize
|
||||||
|
|
||||||
|
atTheBottom: flick.contentY >= (flick.contentHeight - flick.height)
|
||||||
|
timeout: 10 * 1000
|
||||||
|
}
|
||||||
} // of Item
|
} // of Item
|
||||||
|
|
33
src/GUI/qml/ScrollToBottomHint.qml
Normal file
33
src/GUI/qml/ScrollToBottomHint.qml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
import QtQuick 2.4
|
||||||
|
import QtQml 2.4
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
property alias timeout: showTimeout.interval
|
||||||
|
|
||||||
|
property bool atTheBottom: false
|
||||||
|
property bool didTimeout: false
|
||||||
|
|
||||||
|
opacity: didTimeout && !atTheBottom
|
||||||
|
|
||||||
|
width: image.width
|
||||||
|
height: image.height
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: showTimeout
|
||||||
|
running: true
|
||||||
|
onTriggered: didTimeout = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: 800
|
||||||
|
easing: Easing.InOutQuad
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: image
|
||||||
|
source: "qrc:///scroll-down-icon-white"
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,6 +30,7 @@
|
||||||
<file alias="toolbox-addons">assets/toolbox-addons.png</file>
|
<file alias="toolbox-addons">assets/toolbox-addons.png</file>
|
||||||
<file alias="toolbox-help">assets/toolbox-help.png</file>
|
<file alias="toolbox-help">assets/toolbox-help.png</file>
|
||||||
<file alias="back-icon">assets/icons8-back-arrow-50.png</file>
|
<file alias="back-icon">assets/icons8-back-arrow-50.png</file>
|
||||||
|
<file alias="scroll-down-icon-white">assets/icons8-scroll-down-50.png</file>
|
||||||
<file>qml/AircraftList.qml</file>
|
<file>qml/AircraftList.qml</file>
|
||||||
<file>qml/AircraftRating.qml</file>
|
<file>qml/AircraftRating.qml</file>
|
||||||
<file>qml/ArrowButton.qml</file>
|
<file>qml/ArrowButton.qml</file>
|
||||||
|
@ -143,6 +144,7 @@
|
||||||
<file>qml/DidMigrateOfficialCatalogNotification.qml</file>
|
<file>qml/DidMigrateOfficialCatalogNotification.qml</file>
|
||||||
<file>qml/DidMigrateOtherCatalogNotification.qml</file>
|
<file>qml/DidMigrateOtherCatalogNotification.qml</file>
|
||||||
<file>qml/BackButton.qml</file>
|
<file>qml/BackButton.qml</file>
|
||||||
|
<file>qml/ScrollToBottomHint.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/preview">
|
<qresource prefix="/preview">
|
||||||
<file alias="close-icon">assets/preview-close.png</file>
|
<file alias="close-icon">assets/preview-close.png</file>
|
||||||
|
|
Loading…
Add table
Reference in a new issue