8import QtQuick.Controls as QQC2
9import org.kde.kirigami as Kirigami
34Kirigami.ScrollablePage {
37 readonly property int margins: 6
44 property bool extraFooterTopPadding: false
53 property bool headerPaddingEnabled: false
55 function __itemVisible(item: Item): bool {
56 return item !== null && item.visible && item.implicitHeight > 0;
59 function __headerContentVisible(): bool {
60 return __itemVisible(headerParent.contentItem);
63 property bool __flickableOverflows: flickable.contentHeight + flickable.topMargin + flickable.bottomMargin > flickable.height
66 title: (typeof kcm !==
"undefined") ? kcm.name :
""
71 property bool sidebarMode:
false
76 bottomPadding: margins
87 height: root.__headerContentVisible() ? undefined : 0
88 padding: root.headerPaddingEnabled ? root.margins : 0
99 visible: root.__headerContentVisible()
103 function __swapContentIntoContainer(property:
string, container:
Item): void {
104 const content = this[property];
105 const rootContainer = container.parent;
107 if (content && content !== rootContainer) {
110 content.anchors.top = undefined;
112 this[property] = rootContainer;
113 container.contentItem = content;
117 function __adoptOverlaySheets(): void {
119 for (const object of contentItem.data) {
120 if (
object instanceof
Kirigami.OverlaySheet) {
121 if (object.parent === null) {
122 object.parent = this;
129 Component.onCompleted: {
130 __swapContentIntoContainer(
"header", headerParent);
131 __adoptOverlaySheets();
QTextStream & left(QTextStream &stream)
QTextStream & right(QTextStream &stream)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:19 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.