2018-07-12 01:44:41 +00:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import QtQuick.Controls.Material 2.2
|
2018-03-21 11:13:47 +00:00
|
|
|
|
2018-09-10 00:06:32 +00:00
|
|
|
import "qrc:/js/util.js" as Util
|
|
|
|
|
2018-09-02 13:26:42 +00:00
|
|
|
ItemDelegate {
|
2018-07-07 09:38:20 +00:00
|
|
|
property var page
|
2018-09-02 13:26:42 +00:00
|
|
|
readonly property bool selected: stackView.currentItem === page
|
2018-03-21 11:13:47 +00:00
|
|
|
|
|
|
|
Rectangle {
|
2018-09-02 13:26:42 +00:00
|
|
|
width: selected ? 4 : 0
|
2018-03-21 11:13:47 +00:00
|
|
|
height: parent.height
|
2018-09-02 13:26:42 +00:00
|
|
|
|
|
|
|
color: Material.accent
|
2018-03-21 11:13:47 +00:00
|
|
|
|
|
|
|
Behavior on width {
|
|
|
|
PropertyAnimation { easing.type: Easing.InOutCubic; duration: 200 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-10 00:06:32 +00:00
|
|
|
onClicked: Util.pushToStack(stackView, page)
|
2018-03-21 11:13:47 +00:00
|
|
|
}
|