// SPDX-FileCopyrightText: 2023 Devin Lin // SPDX-License-Identifier: LGPL-2.0-or-later import QtQuick import QtQuick.Layouts import QtQuick.Controls as Controls import Qt5Compat.GraphicalEffects import org.kde.plasma.components 3.0 as PC3 import org.kde.kirigami as Kirigami import org.kde.plasma.private.mobileshell as MobileShell import org.kde.private.mobile.homescreen.folio as Folio import 'private' Item { id: root required property Folio.HomeScreen folio property var homeScreen property real leftPadding: 0 property real topPadding: 0 property real bottomPadding: 0 property real rightPadding: 0 required property int headerHeight required property var headerItem // height from top of screen that the drawer starts readonly property real drawerTopMargin: height - topPadding - bottomPadding property alias flickable: appDrawerGrid Item { anchors.fill: parent anchors.leftMargin: root.leftPadding anchors.topMargin: root.topPadding anchors.rightMargin: root.rightPadding anchors.bottomMargin: root.bottomPadding // drawer header MobileShell.BaseItem { id: drawerHeader height: root.headerHeight anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right contentItem: root.headerItem } AppDrawerGrid { id: appDrawerGrid folio: root.folio homeScreen: root.homeScreen height: parent.height - drawerHeader.height anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom opacity: 0 headerHeight: root.headerHeight } // opacity gradient at grid edges FlickableOpacityGradient { anchors.fill: appDrawerGrid flickable: appDrawerGrid } } }