mobileshell: Implement base flickable with higher maximum swipe speed

This commit is contained in:
Devin Lin 2022-07-08 18:34:04 -04:00
parent 606997be18
commit fbc644fced
13 changed files with 41 additions and 7 deletions

View file

@ -70,6 +70,9 @@ void MobileShellPlugin::registerTypes(const char *uri)
// /components
qmlRegisterType(resolvePath("components/BaseItem.qml"), uri, 1, 0, "BaseItem");
qmlRegisterType(resolvePath("components/ExtendedAbstractButton.qml"), uri, 1, 0, "ExtendedAbstractButton");
qmlRegisterType(resolvePath("components/Flickable.qml"), uri, 1, 0, "Flickable");
qmlRegisterType(resolvePath("components/GridView.qml"), uri, 1, 0, "GridView");
qmlRegisterType(resolvePath("components/ListView.qml"), uri, 1, 0, "ListView");
qmlRegisterSingletonType(resolvePath("components/Haptics.qml"), uri, 1, 0, "Haptics");
qmlRegisterType(resolvePath("components/StartupFeedback.qml"), uri, 1, 0, "StartupFeedback");
qmlRegisterType(resolvePath("components/VelocityCalculator.qml"), uri, 1, 0, "VelocityCalculator");

View file

@ -222,7 +222,7 @@ Item {
onFinished: root.opened = true;
}
Flickable {
MobileShell.Flickable {
id: flickable
anchors.fill: parent

View file

@ -0,0 +1,8 @@
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
Flickable {
maximumFlickVelocity: 5000
}

View file

@ -0,0 +1,9 @@
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Controls 2.15
GridView {
maximumFlickVelocity: 5000
}

View file

@ -0,0 +1,9 @@
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Controls 2.15
ListView {
maximumFlickVelocity: 5000
}

View file

@ -22,8 +22,11 @@
<file>qml/components/BaseItem.qml</file>
<file>qml/components/ExtendedAbstractButton.qml</file>
<file>qml/components/Flickable.qml</file>
<file>qml/components/GridView.qml</file>
<file>qml/components/Haptics.qml</file>
<file>qml/components/HapticsEffectWrapper.qml</file>
<file>qml/components/ListView.qml</file>
<file>qml/components/MarqueeLabel.qml</file>
<file>qml/components/StartupFeedback.qml</file>
<file>qml/components/util.js</file>

View file

@ -13,7 +13,7 @@ import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.private.nanoshell 2.0 as NanoShell
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
Flickable {
MobileShell.Flickable {
id: root
required property var homeScreenState

View file

@ -24,7 +24,7 @@ import "../private"
AbstractAppDrawer {
id: root
contentItem: GridView {
contentItem: MobileShell.GridView {
id: gridView
clip: true

View file

@ -24,7 +24,7 @@ import "../private"
AbstractAppDrawer {
id: root
contentItem: ListView {
contentItem: MobileShell.ListView {
id: listView
clip: true
reuseItems: true

View file

@ -16,7 +16,7 @@ import org.kde.kirigami 2.19 as Kirigami
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
import org.kde.phone.homescreen.halcyon 1.0 as Halcyon
GridView {
MobileShell.GridView {
id: root
required property var searchWidget

View file

@ -18,6 +18,7 @@ import org.kde.phone.homescreen.halcyon 1.0 as Halcyon
Item {
id: root
layer.enabled: true
required property bool interactive
required property var searchWidget

View file

@ -17,7 +17,7 @@ import org.kde.kirigami 2.19 as Kirigami
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
import org.kde.phone.homescreen.halcyon 1.0 as Halcyon
GridView {
MobileShell.GridView {
id: root
property Halcyon.ApplicationFolder folder: null

View file

@ -17,8 +17,9 @@ import org.kde.plasma.private.nanoshell 2.0 as NanoShell
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
import org.kde.phone.homescreen.halcyon 1.0 as Halcyon
GridView {
MobileShell.GridView {
id: gridView
layer.enabled: true
readonly property int reservedSpaceForLabel: metrics.height
required property real effectiveContentWidth