mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 07:03:08 +00:00
mobileshell: Implement base flickable with higher maximum swipe speed
This commit is contained in:
parent
606997be18
commit
fbc644fced
13 changed files with 41 additions and 7 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ Item {
|
|||
onFinished: root.opened = true;
|
||||
}
|
||||
|
||||
Flickable {
|
||||
MobileShell.Flickable {
|
||||
id: flickable
|
||||
anchors.fill: parent
|
||||
|
||||
|
|
|
|||
8
components/mobileshell/qml/components/Flickable.qml
Normal file
8
components/mobileshell/qml/components/Flickable.qml
Normal 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
|
||||
}
|
||||
9
components/mobileshell/qml/components/GridView.qml
Normal file
9
components/mobileshell/qml/components/GridView.qml
Normal 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
|
||||
}
|
||||
9
components/mobileshell/qml/components/ListView.qml
Normal file
9
components/mobileshell/qml/components/ListView.qml
Normal 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
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import "../private"
|
|||
AbstractAppDrawer {
|
||||
id: root
|
||||
|
||||
contentItem: GridView {
|
||||
contentItem: MobileShell.GridView {
|
||||
id: gridView
|
||||
clip: true
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import "../private"
|
|||
AbstractAppDrawer {
|
||||
id: root
|
||||
|
||||
contentItem: ListView {
|
||||
contentItem: MobileShell.ListView {
|
||||
id: listView
|
||||
clip: true
|
||||
reuseItems: true
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue