Warning, /plasma/plasma-desktop/applets/kickoff/package/contents/ui/NormalPage.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Noah Davis <noahadvs@gmail.com> 0003 * SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 import QtQuick 2.15 0007 import QtQuick.Templates 2.15 as T 0008 import QtQml 2.15 0009 0010 EmptyPage { 0011 id: root 0012 property real preferredSideBarWidth: Math.max(footer.tabBar.implicitWidth, applicationsPage.implicitSideBarWidth) 0013 0014 contentItem: HorizontalStackView { 0015 id: stackView 0016 focus: true 0017 reverseTransitions: footer.tabBar.currentIndex === 1 0018 initialItem: ApplicationsPage { 0019 id: applicationsPage 0020 preferredSideBarWidth: root.preferredSideBarWidth + kickoff.backgroundMetrics.leftPadding 0021 } 0022 Component { 0023 id: placesPage 0024 PlacesPage { 0025 preferredSideBarWidth: root.preferredSideBarWidth + kickoff.backgroundMetrics.leftPadding 0026 preferredSideBarHeight: applicationsPage.implicitSideBarHeight 0027 } 0028 } 0029 Connections { 0030 target: footer.tabBar 0031 function onCurrentIndexChanged() { 0032 if (footer.tabBar.currentIndex === 0) { 0033 stackView.replace(applicationsPage) 0034 } else if (footer.tabBar.currentIndex === 1) { 0035 stackView.replace(placesPage) 0036 } 0037 } 0038 } 0039 } 0040 0041 footer: Footer { 0042 id: footer 0043 preferredTabBarWidth: root.preferredSideBarWidth 0044 Binding { 0045 target: kickoff 0046 property: "footer" 0047 value: footer 0048 restoreMode: Binding.RestoreBinding 0049 } 0050 // Eat down events to prevent them from reaching the contentArea or searchField 0051 Keys.onDownPressed: event => {} 0052 } 0053 }