29 lines
876 B
QML
29 lines
876 B
QML
// ContentPage.qml from end-4 https://github.com/end-4/dots-hyprland/blob/main/.config/quickshell/ii/modules/common/widgets/ContentPage.qml
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import qs.common.widgets
|
|
|
|
StyledFlickable {
|
|
id: root
|
|
property real baseWidth: 550
|
|
property bool forceWidth: false
|
|
property real bottomContentPadding: 100
|
|
|
|
default property alias data: contentColumn.data
|
|
|
|
clip: true
|
|
contentHeight: contentColumn.implicitHeight + root.bottomContentPadding // Add some padding at the bottom
|
|
implicitWidth: contentColumn.implicitWidth
|
|
|
|
ColumnLayout {
|
|
id: contentColumn
|
|
width: root.forceWidth ? root.baseWidth : Math.max(root.baseWidth, implicitWidth)
|
|
anchors {
|
|
top: parent.top
|
|
horizontalCenter: parent.horizontalCenter
|
|
margins: 10
|
|
}
|
|
spacing: 20
|
|
}
|
|
|
|
} |