Kirigami2
8 import org.kde.kirigami 2.4 as Kirigami
75 Kirigami.AbstractApplicationItem {
90 property alias pageStack: __pageStack
93 wideScreen: width >= applicationWindow().pageStack.defaultColumnWidth * 2
96 if (pageStack.currentItem) {
97 pageStack.currentItem.forceActiveFocus();
106 bottomMargin: ((
Qt.platform.os ===
"android" ||
Qt.platform.os ===
"ios") || !
Qt.inputMethod.visible) ? 0 :
Qt.inputMethod.keyboardRectangle.height
107 onBottomMarginChanged: {
108 if (bottomMargin > 0) {
109 root.reachableMode =
false;
114 onCurrentIndexChanged: root.reachableMode =
false;
118 const backEvent = {accepted:
false}
119 if (root.pageStack.currentIndex >= 1) {
120 root.pageStack.currentItem.backRequested(backEvent);
121 if (!backEvent.accepted) {
122 root.pageStack.flickBack();
123 backEvent.accepted =
true;
127 if (Kirigami.Settings.isMobile && !backEvent.accepted &&
Qt.platform.os !==
"ios") {
131 function goForward() {
132 root.pageStack.currentIndex = Math.min(root.pageStack.depth - 1, root.pageStack.currentIndex + 1);
134 Keys.onBackPressed:
event => {
136 event.accepted =
true;
139 sequences: [StandardKey.Forward]
140 onActivated: __pageStack.goForward();
143 sequences: [StandardKey.Back]
144 onActivated: __pageStack.goBack();
147 background: Rectangle {
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.