diff --git a/components/mobileshell/qml/components/Constants.qml b/components/mobileshell/qml/components/Constants.qml index a2b200c7..feb9ed39 100644 --- a/components/mobileshell/qml/components/Constants.qml +++ b/components/mobileshell/qml/components/Constants.qml @@ -4,6 +4,7 @@ import QtQuick import org.kde.plasma.core as PlasmaCore +import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings // NOTE: This is a singleton in the mobileshell library, so we need to be careful to // make this load as fast as possible (since it may be loaded in other processes ex. lockscreen). @@ -12,4 +13,5 @@ pragma Singleton QtObject { readonly property real topPanelHeight: PlasmaCore.Units.gridUnit + PlasmaCore.Units.smallSpacing + readonly property real bottomPanelHeight: ShellSettings.Settings.navigationPanelEnabled ? PlasmaCore.Units.gridUnit * 2 : 0 } diff --git a/kwin/mobiletaskswitcher/qml/FlickContainer.qml b/kwin/mobiletaskswitcher/qml/FlickContainer.qml index bb3ac4cc..25123b82 100644 --- a/kwin/mobiletaskswitcher/qml/FlickContainer.qml +++ b/kwin/mobiletaskswitcher/qml/FlickContainer.qml @@ -1,12 +1,7 @@ // SPDX-FileCopyrightText: 2021-2023 Devin Lin // SPDX-License-Identifier: LGPL-2.0-or-later -import QtQuick 2.15 -import QtQuick.Layouts 1.15 - -import org.kde.taskmanager 0.1 as TaskManager -import org.kde.plasma.core 2.1 as PlasmaCore -import org.kde.plasma.components 3.0 as PlasmaComponents +import QtQuick Flickable { id: root diff --git a/kwin/mobiletaskswitcher/qml/Task.qml b/kwin/mobiletaskswitcher/qml/Task.qml index ff4e3403..36fdfc85 100644 --- a/kwin/mobiletaskswitcher/qml/Task.qml +++ b/kwin/mobiletaskswitcher/qml/Task.qml @@ -2,13 +2,11 @@ // SPDX-FileCopyrightText: 2021-2023 Devin Lin // SPDX-License-Identifier: GPL-2.0-or-later -import QtQuick 2.15 -import QtQuick.Layouts 1.1 -import QtQuick.Window 2.2 -import QtQuick.Controls 2.2 as QQC2 +import QtQuick +import QtQuick.Layouts import Qt5Compat.GraphicalEffects -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.core as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.kwin 3.0 as KWinComponents diff --git a/kwin/mobiletaskswitcher/qml/TaskList.qml b/kwin/mobiletaskswitcher/qml/TaskList.qml index b105111f..e60a8b7c 100644 --- a/kwin/mobiletaskswitcher/qml/TaskList.qml +++ b/kwin/mobiletaskswitcher/qml/TaskList.qml @@ -1,11 +1,10 @@ // SPDX-FileCopyrightText: 2021 Devin Lin // SPDX-License-Identifier: GPL-2.0-or-later -import QtQuick 2.12 -import QtQuick.Layouts 1.1 +import QtQuick +import QtQuick.Layouts -import org.kde.taskmanager 0.1 as TaskManager -import org.kde.plasma.core 2.1 as PlasmaCore +import org.kde.plasma.core as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.kwin 3.0 as KWinComponents @@ -28,7 +27,7 @@ Item { let baseY = (taskSwitcher.height / 2) - (taskSwitcherState.taskHeight / 2) - (taskSwitcherState.taskHeaderHeight / 2) - return baseY + diff / 2; + return baseY + diff / 2 - shellTopMargin; } function closeAll() { diff --git a/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml b/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml index fc5f62b0..822ce34d 100644 --- a/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml +++ b/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml @@ -2,17 +2,14 @@ // SPDX-FileCopyrightText: 2021-2023 Devin Lin // SPDX-License-Identifier: GPL-2.0-or-later -import QtQuick 2.15 -import QtQuick.Controls 2.15 as QQC2 -import QtQuick.Layouts 1.1 -import QtQuick.Window 2.15 +import QtQuick +import QtQuick.Layouts import Qt5Compat.GraphicalEffects -import org.kde.taskmanager 0.1 as TaskManager -import org.kde.plasma.core 2.1 as PlasmaCore +import org.kde.plasma.core as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.kirigami 2.19 as Kirigami -import org.kde.plasma.extras 2.0 as PlasmaExtras +import org.kde.plasma.extras as PlasmaExtras +import org.kde.plasma.private.mobileshell as MobileShell import org.kde.kwin 3.0 as KWinComponents import org.kde.kwin.private.effects 1.0 @@ -27,8 +24,8 @@ FocusScope { readonly property QtObject effect: KWinComponents.SceneView.effect readonly property QtObject targetScreen: KWinComponents.SceneView.screen - readonly property real topMargin: 0 - readonly property real bottomMargin: 0 + readonly property real topMargin: MobileShell.Constants.topPanelHeight + readonly property real bottomMargin: MobileShell.Constants.bottomPanelHeight readonly property real leftMargin: 0 readonly property real rightMargin: 0 @@ -184,13 +181,13 @@ FocusScope { anchors.centerIn: parent - Kirigami.Icon { + PlasmaCore.IconItem { id: icon Layout.alignment: Qt.AlignHCenter implicitWidth: PlasmaCore.Units.iconSizes.large implicitHeight: PlasmaCore.Units.iconSizes.large source: "window" - color: "white" + // color: "white" } PlasmaExtras.Heading {