2020-03-06 23:40:48 +11:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
|
|
|
|
HDrawer {
|
|
|
|
id: pane
|
|
|
|
defaultSize: buttonRepeater.summedImplicitWidth
|
|
|
|
minimumSize:
|
|
|
|
buttonRepeater.count > 0 ? buttonRepeater.itemAt(0).implicitWidth : 0
|
|
|
|
|
|
|
|
|
|
|
|
property color buttonsBackgroundColor
|
|
|
|
|
|
|
|
readonly property alias buttonRepeater: buttonRepeater
|
|
|
|
readonly property alias swipeView: swipeView
|
|
|
|
|
|
|
|
default property alias swipeViewData: swipeView.contentData
|
|
|
|
|
|
|
|
|
|
|
|
HColumnLayout {
|
|
|
|
anchors.fill: parent
|
|
|
|
|
2020-03-13 16:09:04 +11:00
|
|
|
Rectangle {
|
|
|
|
color: buttonsBackgroundColor
|
2020-03-06 23:40:48 +11:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
2020-03-13 16:09:04 +11:00
|
|
|
Layout.preferredHeight: childrenRect.height
|
|
|
|
|
|
|
|
HFlow {
|
|
|
|
id: buttonFlow
|
|
|
|
width: parent.width
|
|
|
|
populate: null
|
2020-03-06 23:40:48 +11:00
|
|
|
|
2020-03-13 16:09:04 +11:00
|
|
|
HRepeater {
|
|
|
|
id: buttonRepeater
|
|
|
|
}
|
2020-03-06 23:40:48 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
HSwipeView {
|
|
|
|
id: swipeView
|
|
|
|
clip: true
|
|
|
|
interactive: ! pane.collapsed
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|