Scare Crowe d2ebfd0519 QortalOS Titan 5.60.12
Screw the description like that inbred T3Q
2022-03-05 21:17:59 +05:00

56 lines
1.8 KiB
QML

/*
* SPDX-FileCopyrightText: 2021 Noah Davis <noahadvs@gmail.com>
* SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick 2.15
import QtQuick.Templates 2.15 as T
import QtQml 2.15
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PC3
EmptyPage {
id: root
property real preferredSideBarWidth: Math.max(footer.tabBar.implicitWidth, applicationsPage.implicitSideBarWidth)
contentItem: HorizontalStackView {
id: stackView
focus: true
reverseTransitions: footer.tabBar.currentIndex === 1
initialItem: ApplicationsPage {
id: applicationsPage
preferredSideBarWidth: root.preferredSideBarWidth + plasmoid.rootItem.backgroundMetrics.leftPadding
}
Component {
id: placesPage
PlacesPage {
preferredSideBarWidth: root.preferredSideBarWidth + plasmoid.rootItem.backgroundMetrics.leftPadding
preferredSideBarHeight: applicationsPage.implicitSideBarHeight
}
}
Connections {
target: footer.tabBar
function onCurrentIndexChanged() {
if (footer.tabBar.currentIndex === 0) {
stackView.replace(applicationsPage)
} else if (footer.tabBar.currentIndex === 1) {
stackView.replace(placesPage)
}
}
}
}
footer: Footer {
id: footer
preferredTabBarWidth: root.preferredSideBarWidth
Binding {
target: plasmoid.rootItem
property: "footer"
value: footer
restoreMode: Binding.RestoreBinding
}
// Eat down events to prevent them from reaching the contentArea or searchField
Keys.onDownPressed: {}
}
}