mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
This merge request fixes an issue with notification list scrolling and also adds a few general improvements. To accomplish this, the notification widget was moved outside of the action drawer swipe area and lock screen swipe area, separating them from the parent-child relationship. Instead, the notification widget is now layered separately on top. This change seems to fix the conflict when both areas are accepting swipes from the same direction. Additionally, changes were made to the notification list widget for the action drawer to make it behave similarly to the folio home screen app library. Specifically, when at the top of the list, one can swipe down over the notification area to expand the action drawer. In landscape mode, the media widget, clock, and date were also added to the notification list to provide more room for viewing notifications when scrolling. Closes https://invent.kde.org/plasma/plasma-mobile/-/issues/318
75 lines
2 KiB
QML
75 lines
2 KiB
QML
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
// 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
|
|
z: 1
|
|
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 // we display with the opacity gradient below
|
|
headerHeight: root.headerHeight
|
|
}
|
|
|
|
// opacity gradient at grid edges
|
|
MobileShell.FlickableOpacityGradient {
|
|
anchors.fill: appDrawerGrid
|
|
flickable: appDrawerGrid
|
|
}
|
|
}
|
|
}
|