moment/src/gui/Base/HFlickableColumnPage.qml

58 lines
1.4 KiB
QML
Raw Normal View History

// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
2020-06-26 17:16:36 +10:00
import QtQuick.Controls 2.12
import "../ShortcutBundles"
HPage {
id: page
implicitWidth: theme.controls.box.defaultWidth
contentHeight:
flickable.contentHeight + flickable.topMargin + flickable.bottomMargin
default property alias columnData: column.data
property alias column: column
property alias flickable: flickable
property alias flickShortcuts: flickShortcuts
2020-06-26 17:16:36 +10:00
property bool enableFlickShortcuts:
SwipeView ? SwipeView.isCurrentItem : true
padding: 0
HFlickable {
id: flickable
anchors.fill: parent
contentWidth: parent.width
contentHeight: column.implicitHeight
clip: true
topMargin: theme.spacing
bottomMargin: topMargin
leftMargin: topMargin
rightMargin: topMargin
FlickShortcuts {
id: flickShortcuts
2020-06-26 17:16:36 +10:00
active: ! mainUI.debugConsole.visible && enableFlickShortcuts
flickable: flickable
}
HColumnLayout {
id: column
width:
flickable.width - flickable.leftMargin - flickable.rightMargin
spacing: theme.spacing * 1.5
}
}
HKineticScrollingDisabler {
flickable: flickable
width: enabled ? flickable.width : 0
height: enabled ? flickable.height : 0
}
}