2023-10-22 03:59:27 +00:00
|
|
|
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
|
|
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
2015-02-25 18:26:04 +00:00
|
|
|
|
2023-11-16 04:24:44 +00:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Window
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import QtQuick.Effects
|
2026-05-19 07:13:00 +00:00
|
|
|
import QtQuick.Shapes 1.8
|
2015-02-25 18:26:04 +00:00
|
|
|
|
2026-03-07 03:08:07 +00:00
|
|
|
import org.kde.kirigami as Kirigami
|
2023-07-25 01:13:52 +00:00
|
|
|
|
2015-02-25 18:26:04 +00:00
|
|
|
import org.kde.plasma.plasmoid 2.0
|
2019-09-04 16:39:31 +00:00
|
|
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
2015-02-25 18:26:04 +00:00
|
|
|
|
2023-11-02 11:08:17 +00:00
|
|
|
import org.kde.plasma.private.mobileshell as MobileShell
|
|
|
|
|
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
2023-03-16 07:21:01 +00:00
|
|
|
import org.kde.plasma.private.mobileshell.windowplugin as WindowPlugin
|
2024-03-08 15:38:59 +00:00
|
|
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
2026-04-20 07:43:11 +00:00
|
|
|
import org.kde.plasma.private.mobileshell.gamingshellplugin as GamingShell
|
2020-07-22 15:17:10 +00:00
|
|
|
|
2026-04-11 07:42:21 +00:00
|
|
|
import org.kde.layershell 1.0 as LayerShell
|
2026-04-17 11:56:08 +00:00
|
|
|
import org.kde.plasma.private.sessions 2.0
|
2026-04-18 09:07:48 +00:00
|
|
|
import org.kde.coreaddons as KCoreAddons
|
|
|
|
|
import org.kde.kcmutils as KCM
|
|
|
|
|
import org.kde.kirigamiaddons.components as KirigamiAddonsComponents
|
2026-04-11 07:42:21 +00:00
|
|
|
|
2025-07-16 17:02:18 +00:00
|
|
|
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
|
|
|
|
|
2026-04-19 11:51:08 +00:00
|
|
|
import "./gaming"
|
|
|
|
|
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
import "./private"
|
|
|
|
|
|
2023-06-12 23:58:17 +00:00
|
|
|
ContainmentItem {
|
2015-02-25 18:26:04 +00:00
|
|
|
id: root
|
2026-04-29 10:10:31 +00:00
|
|
|
property var folio: root.plasmoid
|
2026-05-21 09:13:36 +00:00
|
|
|
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
2015-02-25 18:26:04 +00:00
|
|
|
|
2026-04-19 11:51:08 +00:00
|
|
|
// Tracks whether the Game Center grid is visible within gaming mode.
|
2026-04-20 06:57:03 +00:00
|
|
|
// If gaming mode is already enabled at startup, open it immediately so
|
|
|
|
|
// the user is never left without controls.
|
|
|
|
|
property bool gameCenterOpen: ShellSettings.Settings.gamingModeEnabled
|
2026-04-19 11:51:08 +00:00
|
|
|
property bool showGameCenterHint: false
|
|
|
|
|
|
2026-04-21 07:08:03 +00:00
|
|
|
// State saved when gaming mode activates, restored when it deactivates
|
|
|
|
|
property string _savedPowerProfile: ""
|
|
|
|
|
property bool _savedDnd: false
|
|
|
|
|
property bool _gamingSessionActive: false
|
|
|
|
|
|
|
|
|
|
function _applyGamingModeState(enabled) {
|
|
|
|
|
root.gameCenterOpen = enabled
|
|
|
|
|
GamingShell.GamepadManager.active = enabled
|
|
|
|
|
|
|
|
|
|
if (enabled === root._gamingSessionActive) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (enabled) {
|
|
|
|
|
// Save current state and apply gaming optimizations
|
|
|
|
|
root._savedDnd = MobileShellState.ShellDBusClient.doNotDisturb
|
|
|
|
|
MobileShellState.ShellDBusClient.doNotDisturb = true
|
|
|
|
|
|
|
|
|
|
if (GamingShell.PowerProfileControl.available) {
|
|
|
|
|
root._savedPowerProfile = GamingShell.PowerProfileControl.activeProfile
|
|
|
|
|
GamingShell.PowerProfileControl.activeProfile = "performance"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GamingShell.GameModeControl.requestStart()
|
|
|
|
|
root._gamingSessionActive = true
|
|
|
|
|
} else {
|
|
|
|
|
// Restore previous state
|
|
|
|
|
MobileShellState.ShellDBusClient.doNotDisturb = root._savedDnd
|
|
|
|
|
|
|
|
|
|
if (GamingShell.PowerProfileControl.available && root._savedPowerProfile.length > 0) {
|
|
|
|
|
GamingShell.PowerProfileControl.activeProfile = root._savedPowerProfile
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GamingShell.GameModeControl.requestEnd()
|
|
|
|
|
root._gamingSessionActive = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-19 11:51:08 +00:00
|
|
|
Timer {
|
|
|
|
|
id: gameCenterHintTimer
|
|
|
|
|
interval: 2600
|
|
|
|
|
onTriggered: root.showGameCenterHint = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
|
target: ShellSettings.Settings
|
|
|
|
|
function onGamingModeEnabledChanged() {
|
2026-04-21 07:08:03 +00:00
|
|
|
root._applyGamingModeState(ShellSettings.Settings.gamingModeEnabled)
|
2026-04-20 07:43:11 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Gamepad Guide button toggles Game Center overlay
|
|
|
|
|
Connections {
|
|
|
|
|
target: GamingShell.GamepadManager
|
|
|
|
|
enabled: ShellSettings.Settings.gamingModeEnabled
|
|
|
|
|
function onButtonPressed(button, gamepadIndex) {
|
|
|
|
|
if (button === GamingShell.GamepadManager.ButtonGuide) {
|
|
|
|
|
root.gameCenterOpen = !root.gameCenterOpen
|
|
|
|
|
}
|
2026-04-19 11:51:08 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-04 16:39:31 +00:00
|
|
|
Component.onCompleted: {
|
2026-04-21 07:08:03 +00:00
|
|
|
root._applyGamingModeState(ShellSettings.Settings.gamingModeEnabled)
|
2024-06-21 04:42:14 +00:00
|
|
|
folio.FolioSettings.load();
|
|
|
|
|
folio.FavouritesModel.load();
|
|
|
|
|
folio.PageListModel.load();
|
2015-03-05 12:37:39 +00:00
|
|
|
}
|
2023-06-12 23:58:17 +00:00
|
|
|
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
property MobileShell.MaskManager maskManager: MobileShell.MaskManager {
|
|
|
|
|
height: root.height
|
|
|
|
|
width: root.width
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
property MobileShell.MaskManager frontMaskManager: MobileShell.MaskManager {
|
|
|
|
|
height: root.height
|
|
|
|
|
width: root.width
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// wallpaper blur layer
|
|
|
|
|
MobileShell.BlurEffect {
|
2025-06-25 23:22:58 +00:00
|
|
|
id: wallpaperBlur
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
active: folio.FolioSettings.wallpaperBlurEffect > 0
|
2023-11-17 06:40:07 +00:00
|
|
|
anchors.fill: parent
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
sourceLayer: Plasmoid.wallpaperGraphicsObject
|
|
|
|
|
maskSourceLayer: folio.FolioSettings.wallpaperBlurEffect > 1 ? maskManager.maskLayer : null
|
|
|
|
|
|
|
|
|
|
fullBlur: Math.min(1,
|
|
|
|
|
Math.max(
|
|
|
|
|
1 - homeScreen.contentOpacity,
|
2026-04-09 10:29:46 +00:00
|
|
|
// Convergence: no blur for popup drawer
|
|
|
|
|
ShellSettings.Settings.convergenceModeEnabled ? 0 : folio.HomeScreenState.appDrawerOpenProgress * 2,
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
folio.HomeScreenState.searchWidgetOpenProgress * 1.5, // blur faster during swipe
|
|
|
|
|
folio.HomeScreenState.folderOpenProgress
|
|
|
|
|
)
|
2025-06-25 23:22:58 +00:00
|
|
|
)
|
2023-11-15 16:42:43 +00:00
|
|
|
}
|
|
|
|
|
|
2024-06-23 22:47:24 +00:00
|
|
|
WindowPlugin.WindowMaximizedTracker {
|
|
|
|
|
id: windowMaximizedTracker
|
|
|
|
|
screenGeometry: Plasmoid.containment.screenGeometry
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-20 08:32:30 +00:00
|
|
|
// In gaming mode, reopen Game Center when the last window goes away
|
|
|
|
|
// so the user is never stranded on a bare wallpaper.
|
|
|
|
|
Connections {
|
|
|
|
|
target: windowMaximizedTracker
|
|
|
|
|
enabled: ShellSettings.Settings.gamingModeEnabled
|
|
|
|
|
function onShowingWindowChanged() {
|
|
|
|
|
if (!windowMaximizedTracker.showingWindow && !root.gameCenterOpen) {
|
|
|
|
|
root.gameCenterOpen = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-09 08:14:33 +00:00
|
|
|
// Close app drawer when a new window appears
|
|
|
|
|
Connections {
|
|
|
|
|
target: WindowPlugin.WindowUtil
|
|
|
|
|
function onWindowCreated() {
|
|
|
|
|
if (folio.HomeScreenState.viewState === Folio.HomeScreenState.AppDrawerView) {
|
|
|
|
|
folio.HomeScreenState.closeAppDrawer();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-22 03:59:27 +00:00
|
|
|
function homeAction() {
|
2024-06-23 22:47:24 +00:00
|
|
|
const isInWindow = (!WindowPlugin.WindowUtil.isShowingDesktop && windowMaximizedTracker.showingWindow);
|
2023-03-20 01:32:19 +00:00
|
|
|
|
2024-03-08 15:38:59 +00:00
|
|
|
// Always close action drawer
|
|
|
|
|
if (MobileShellState.ShellDBusClient.isActionDrawerOpen) {
|
|
|
|
|
MobileShellState.ShellDBusClient.closeActionDrawer();
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-19 11:51:08 +00:00
|
|
|
if (ShellSettings.Settings.gamingModeEnabled) {
|
|
|
|
|
// In gaming mode Home/Menu should reopen the Game Center overlay.
|
|
|
|
|
root.gameCenterOpen = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-15 08:18:34 +00:00
|
|
|
if (ShellSettings.Settings.convergenceModeEnabled) {
|
|
|
|
|
// Convergence: toggle the app drawer as a layer-shell overlay
|
|
|
|
|
// without disturbing open windows.
|
|
|
|
|
switch (folio.HomeScreenState.viewState) {
|
|
|
|
|
case Folio.HomeScreenState.AppDrawerView:
|
|
|
|
|
folio.HomeScreenState.closeAppDrawer();
|
|
|
|
|
break;
|
|
|
|
|
case Folio.HomeScreenState.FolderView:
|
|
|
|
|
folio.HomeScreenState.closeFolder();
|
|
|
|
|
break;
|
|
|
|
|
case Folio.HomeScreenState.SearchWidgetView:
|
|
|
|
|
folio.HomeScreenState.closeSearchWidget();
|
|
|
|
|
break;
|
|
|
|
|
case Folio.HomeScreenState.SettingsView:
|
|
|
|
|
folio.HomeScreenState.closeSettingsView();
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
folio.HomeScreenState.openAppDrawer();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-22 03:59:27 +00:00
|
|
|
if (isInWindow) {
|
2026-04-15 08:18:34 +00:00
|
|
|
folio.HomeScreenState.closeFolder();
|
|
|
|
|
folio.HomeScreenState.closeSearchWidget();
|
|
|
|
|
folio.HomeScreenState.closeAppDrawer();
|
|
|
|
|
folio.HomeScreenState.goToPage(0, false);
|
2024-03-08 15:38:59 +00:00
|
|
|
|
2026-04-15 08:18:34 +00:00
|
|
|
WindowPlugin.WindowUtil.minimizeAll();
|
2024-07-08 04:08:53 +00:00
|
|
|
|
|
|
|
|
// Always ensure settings view is closed
|
|
|
|
|
if (folio.HomeScreenState.viewState == Folio.HomeScreenState.SettingsView) {
|
|
|
|
|
folio.HomeScreenState.closeSettingsView();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else { // If we are already on the homescreen
|
2024-06-21 04:42:14 +00:00
|
|
|
switch (folio.HomeScreenState.viewState) {
|
2023-10-22 03:59:27 +00:00
|
|
|
case Folio.HomeScreenState.PageView:
|
2026-04-15 08:18:34 +00:00
|
|
|
if (folio.HomeScreenState.currentPage === 0) {
|
2024-06-21 04:42:14 +00:00
|
|
|
folio.HomeScreenState.openAppDrawer();
|
2023-10-22 03:59:27 +00:00
|
|
|
} else {
|
2024-11-09 17:34:57 +00:00
|
|
|
folio.HomeScreenState.goToPage(0, false);
|
2023-10-22 03:59:27 +00:00
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case Folio.HomeScreenState.AppDrawerView:
|
2024-06-21 04:42:14 +00:00
|
|
|
folio.HomeScreenState.closeAppDrawer();
|
2023-10-22 03:59:27 +00:00
|
|
|
break;
|
|
|
|
|
case Folio.HomeScreenState.SearchWidgetView:
|
2024-06-21 04:42:14 +00:00
|
|
|
folio.HomeScreenState.closeSearchWidget();
|
2023-10-22 03:59:27 +00:00
|
|
|
break;
|
|
|
|
|
case Folio.HomeScreenState.FolderView:
|
2024-06-21 04:42:14 +00:00
|
|
|
folio.HomeScreenState.closeFolder();
|
2023-10-22 03:59:27 +00:00
|
|
|
break;
|
2024-07-08 04:08:53 +00:00
|
|
|
case Folio.HomeScreenState.SettingsView:
|
|
|
|
|
folio.HomeScreenState.closeSettingsView();
|
|
|
|
|
break;
|
2023-10-22 03:59:27 +00:00
|
|
|
}
|
2023-03-20 01:32:19 +00:00
|
|
|
}
|
2023-10-22 03:59:27 +00:00
|
|
|
}
|
2023-03-20 01:32:19 +00:00
|
|
|
|
2023-10-22 03:59:27 +00:00
|
|
|
Plasmoid.onActivated: homeAction()
|
2023-06-12 23:58:17 +00:00
|
|
|
|
2023-10-22 03:59:27 +00:00
|
|
|
Rectangle {
|
|
|
|
|
id: appDrawerBackground
|
|
|
|
|
anchors.fill: parent
|
2026-04-09 10:29:46 +00:00
|
|
|
// Convergence: no scrim (popup has own background); mobile: dark scrim
|
|
|
|
|
color: ShellSettings.Settings.convergenceModeEnabled
|
|
|
|
|
? "transparent"
|
|
|
|
|
: Qt.rgba(0, 0, 0, 0.6)
|
2023-06-12 23:58:17 +00:00
|
|
|
|
2024-06-21 04:42:14 +00:00
|
|
|
opacity: folio.HomeScreenState.appDrawerOpenProgress
|
2023-10-22 03:59:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: searchWidgetBackground
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
color: Qt.rgba(0, 0, 0, 0.3)
|
|
|
|
|
|
2024-06-21 04:42:14 +00:00
|
|
|
opacity: folio.HomeScreenState.searchWidgetOpenProgress
|
2023-10-22 03:59:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: settingsViewBackground
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
color: Qt.rgba(0, 0, 0, 0.3)
|
|
|
|
|
|
2024-06-21 04:42:14 +00:00
|
|
|
opacity: folio.HomeScreenState.settingsOpenProgress
|
2019-09-04 16:39:31 +00:00
|
|
|
}
|
2023-06-12 23:58:17 +00:00
|
|
|
|
2026-05-25 06:26:58 +00:00
|
|
|
// Unified convergence chrome — renders the visible top bar, workspace
|
|
|
|
|
// frame, and dock in one mapped surface so they appear together.
|
|
|
|
|
// Invisible reserver surfaces in the panel/taskpanel containments still
|
|
|
|
|
// provide the exclusive zones that shrink KWin's MaximizeArea.
|
2026-04-11 07:42:21 +00:00
|
|
|
Window {
|
2026-05-25 06:26:58 +00:00
|
|
|
id: convergenceChrome
|
2026-05-23 13:33:23 +00:00
|
|
|
readonly property bool active: ShellSettings.Settings.convergenceModeEnabled
|
|
|
|
|
&& !ShellSettings.Settings.gamingModeEnabled
|
|
|
|
|
&& !folio.overviewActive
|
2026-05-06 11:33:25 +00:00
|
|
|
|
|
|
|
|
visible: active
|
2026-04-11 07:42:21 +00:00
|
|
|
color: "transparent"
|
|
|
|
|
width: Screen.width
|
2026-05-25 06:26:58 +00:00
|
|
|
height: Screen.height
|
2026-04-11 07:42:21 +00:00
|
|
|
|
2026-05-25 06:26:58 +00:00
|
|
|
LayerShell.Window.scope: "convergence-chrome"
|
2026-04-11 07:42:21 +00:00
|
|
|
LayerShell.Window.layer: LayerShell.Window.LayerTop
|
2026-05-25 06:26:58 +00:00
|
|
|
LayerShell.Window.anchors: LayerShell.Window.AnchorTop | LayerShell.Window.AnchorBottom
|
|
|
|
|
| LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight
|
|
|
|
|
LayerShell.Window.exclusionZone: -1
|
2026-04-11 07:42:21 +00:00
|
|
|
LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityOnDemand
|
|
|
|
|
|
2026-04-11 10:05:15 +00:00
|
|
|
// Auto-hide: slide dock content off-screen when a window is
|
2026-04-18 07:48:55 +00:00
|
|
|
// maximized. The reveal strip at the screen edge brings it back.
|
2026-04-11 10:05:15 +00:00
|
|
|
property real dockOffset: 0
|
2026-05-25 06:26:58 +00:00
|
|
|
property bool inputRegionInitialized: false
|
|
|
|
|
readonly property real topBarHeight: MobileShell.Constants.topPanelHeight
|
2026-05-04 06:43:10 +00:00
|
|
|
readonly property real dockHeight: MobileShell.Constants.convergenceDockHeight
|
2026-05-25 06:26:58 +00:00
|
|
|
readonly property real frameThickness: MobileShell.Constants.convergenceWorkspaceFrameThickness
|
2026-05-25 07:00:34 +00:00
|
|
|
readonly property real topBarHitHeight: topBarHeight + frameThickness
|
2026-05-25 06:26:58 +00:00
|
|
|
readonly property real frameRadius: Math.min(MobileShell.Constants.convergenceWorkspaceFrameRadius, Math.max(0, Math.min(workAreaWidth, workAreaHeight) / 2))
|
|
|
|
|
readonly property real workAreaX: frameThickness
|
2026-05-25 07:00:34 +00:00
|
|
|
readonly property real workAreaY: topBarHitHeight
|
2026-05-25 06:26:58 +00:00
|
|
|
readonly property real workAreaWidth: Math.max(0, width - frameThickness * 2)
|
|
|
|
|
readonly property real workAreaHeight: Math.max(0, height - topBarHeight - dockHeight - frameThickness * 2)
|
|
|
|
|
readonly property color chromeColor: Kirigami.Theme.backgroundColor
|
|
|
|
|
readonly property color edgeColor: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1)
|
2026-05-21 09:13:36 +00:00
|
|
|
readonly property int dockAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
2026-04-18 07:48:55 +00:00
|
|
|
|
|
|
|
|
// Height of the input-receive strip kept at the screen edge when
|
|
|
|
|
// the dock is hidden. Matches the navigation panel convention.
|
2026-05-04 06:43:10 +00:00
|
|
|
readonly property real revealStripHeight: MobileShell.Constants.convergenceDockRevealHeight
|
2026-04-18 07:48:55 +00:00
|
|
|
|
|
|
|
|
// True once the hover-reveal timer fires; cleared on hover-exit.
|
|
|
|
|
property bool hoverRevealing: false
|
|
|
|
|
|
2026-04-15 07:55:36 +00:00
|
|
|
readonly property bool shouldHide: ShellSettings.Settings.autoHidePanelsEnabled
|
2026-04-18 07:48:55 +00:00
|
|
|
&& windowMaximizedTracker.showingWindow && !hoverRevealing
|
2026-05-25 06:26:58 +00:00
|
|
|
|
|
|
|
|
Kirigami.Theme.inherit: false
|
|
|
|
|
Kirigami.Theme.colorSet: Kirigami.Theme.Window
|
2026-05-06 11:33:38 +00:00
|
|
|
|
|
|
|
|
function updateInputRegion() {
|
2026-05-25 07:00:34 +00:00
|
|
|
const topBarRegion = Qt.rect(0, 0, width, topBarHitHeight)
|
2026-05-06 11:33:38 +00:00
|
|
|
if (shouldHide && dockOffset >= dockHeight) {
|
2026-05-25 06:26:58 +00:00
|
|
|
MobileShell.ShellUtil.setInputRegions(convergenceChrome, [
|
|
|
|
|
topBarRegion,
|
|
|
|
|
Qt.rect(0, height - revealStripHeight, width, revealStripHeight)
|
|
|
|
|
])
|
2026-05-06 11:33:38 +00:00
|
|
|
} else {
|
2026-05-25 06:26:58 +00:00
|
|
|
MobileShell.ShellUtil.setInputRegions(convergenceChrome, [
|
|
|
|
|
topBarRegion,
|
|
|
|
|
Qt.rect(0, height - dockHeight, width, dockHeight)
|
|
|
|
|
])
|
2026-05-06 11:33:38 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onActiveChanged: {
|
|
|
|
|
hoverRevealTimer.stop()
|
|
|
|
|
hoverRevealing = false
|
2026-05-25 06:26:58 +00:00
|
|
|
inputRegionInitialized = false
|
2026-05-06 11:33:38 +00:00
|
|
|
dockOffset = shouldHide ? dockHeight : 0
|
2026-05-25 06:26:58 +00:00
|
|
|
inputRegionTimer.restart()
|
2026-05-06 11:33:38 +00:00
|
|
|
}
|
2026-04-11 10:05:15 +00:00
|
|
|
|
|
|
|
|
onShouldHideChanged: {
|
|
|
|
|
if (shouldHide) {
|
|
|
|
|
dockOffset = dockHeight
|
|
|
|
|
} else {
|
|
|
|
|
dockOffset = 0
|
|
|
|
|
}
|
2026-05-25 06:26:58 +00:00
|
|
|
inputRegionTimer.restart()
|
2026-04-11 10:05:15 +00:00
|
|
|
}
|
|
|
|
|
|
2026-04-18 07:48:55 +00:00
|
|
|
// Narrow the input region to a strip at the screen edge when hidden
|
|
|
|
|
// so that app controls near the bottom edge are not accidentally
|
|
|
|
|
// intercepted. Mirrors the same pattern used by NavigationPanel.
|
|
|
|
|
onDockOffsetChanged: {
|
2026-05-25 06:26:58 +00:00
|
|
|
inputRegionTimer.restart()
|
|
|
|
|
}
|
|
|
|
|
onWidthChanged: inputRegionTimer.restart()
|
|
|
|
|
onHeightChanged: inputRegionTimer.restart()
|
|
|
|
|
onFrameSwapped: {
|
|
|
|
|
if (!inputRegionInitialized) {
|
|
|
|
|
inputRegionInitialized = true
|
|
|
|
|
inputRegionTimer.restart()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
|
id: inputRegionTimer
|
|
|
|
|
interval: 0
|
|
|
|
|
repeat: false
|
|
|
|
|
onTriggered: convergenceChrome.updateInputRegion()
|
2026-04-18 07:48:55 +00:00
|
|
|
}
|
|
|
|
|
|
2026-05-06 11:33:38 +00:00
|
|
|
// Delay reveal briefly so a quick edge graze does not pop the
|
2026-04-18 07:48:55 +00:00
|
|
|
// dock up mid-interaction with the underlying application.
|
|
|
|
|
Timer {
|
|
|
|
|
id: hoverRevealTimer
|
2026-05-06 11:33:38 +00:00
|
|
|
interval: Kirigami.Units.shortDuration
|
2026-04-18 07:48:55 +00:00
|
|
|
repeat: false
|
2026-05-25 06:26:58 +00:00
|
|
|
onTriggered: convergenceChrome.hoverRevealing = true
|
2026-04-11 10:05:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Behavior on dockOffset {
|
2026-05-21 09:13:36 +00:00
|
|
|
MobileShell.MotionNumberAnimation {
|
|
|
|
|
type: MobileShell.Motion.SpatialDefault
|
2026-05-25 06:26:58 +00:00
|
|
|
duration: convergenceChrome.dockAnimationDuration
|
2026-04-11 10:05:15 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-25 06:26:58 +00:00
|
|
|
Rectangle {
|
|
|
|
|
id: topBarSurface
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
height: convergenceChrome.topBarHeight
|
|
|
|
|
color: convergenceChrome.chromeColor
|
|
|
|
|
|
|
|
|
|
MobileShell.StatusBar {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
showSecondRow: false
|
|
|
|
|
showTime: true
|
|
|
|
|
backgroundColor: "transparent"
|
|
|
|
|
}
|
2026-05-06 11:33:25 +00:00
|
|
|
}
|
|
|
|
|
|
2026-05-25 06:26:58 +00:00
|
|
|
Shape {
|
|
|
|
|
id: workspaceFrame
|
2026-04-11 08:34:23 +00:00
|
|
|
anchors.fill: parent
|
2026-05-25 06:26:58 +00:00
|
|
|
|
|
|
|
|
ShapePath {
|
|
|
|
|
fillColor: convergenceChrome.chromeColor
|
|
|
|
|
fillRule: ShapePath.OddEvenFill
|
|
|
|
|
strokeWidth: 0
|
|
|
|
|
|
|
|
|
|
startX: 0
|
|
|
|
|
startY: convergenceChrome.topBarHeight
|
|
|
|
|
PathLine { x: convergenceChrome.width; y: convergenceChrome.topBarHeight }
|
|
|
|
|
PathLine { x: convergenceChrome.width; y: convergenceChrome.height - convergenceChrome.dockHeight }
|
|
|
|
|
PathLine { x: 0; y: convergenceChrome.height - convergenceChrome.dockHeight }
|
|
|
|
|
PathLine { x: 0; y: convergenceChrome.topBarHeight }
|
|
|
|
|
|
|
|
|
|
PathMove { x: convergenceChrome.workAreaX + convergenceChrome.frameRadius; y: convergenceChrome.workAreaY }
|
|
|
|
|
PathLine { x: convergenceChrome.workAreaX + convergenceChrome.workAreaWidth - convergenceChrome.frameRadius; y: convergenceChrome.workAreaY }
|
|
|
|
|
PathArc { x: convergenceChrome.workAreaX + convergenceChrome.workAreaWidth; y: convergenceChrome.workAreaY + convergenceChrome.frameRadius; radiusX: convergenceChrome.frameRadius; radiusY: convergenceChrome.frameRadius }
|
|
|
|
|
PathLine { x: convergenceChrome.workAreaX + convergenceChrome.workAreaWidth; y: convergenceChrome.workAreaY + convergenceChrome.workAreaHeight - convergenceChrome.frameRadius }
|
|
|
|
|
PathArc { x: convergenceChrome.workAreaX + convergenceChrome.workAreaWidth - convergenceChrome.frameRadius; y: convergenceChrome.workAreaY + convergenceChrome.workAreaHeight; radiusX: convergenceChrome.frameRadius; radiusY: convergenceChrome.frameRadius }
|
|
|
|
|
PathLine { x: convergenceChrome.workAreaX + convergenceChrome.frameRadius; y: convergenceChrome.workAreaY + convergenceChrome.workAreaHeight }
|
|
|
|
|
PathArc { x: convergenceChrome.workAreaX; y: convergenceChrome.workAreaY + convergenceChrome.workAreaHeight - convergenceChrome.frameRadius; radiusX: convergenceChrome.frameRadius; radiusY: convergenceChrome.frameRadius }
|
|
|
|
|
PathLine { x: convergenceChrome.workAreaX; y: convergenceChrome.workAreaY + convergenceChrome.frameRadius }
|
|
|
|
|
PathArc { x: convergenceChrome.workAreaX + convergenceChrome.frameRadius; y: convergenceChrome.workAreaY; radiusX: convergenceChrome.frameRadius; radiusY: convergenceChrome.frameRadius }
|
|
|
|
|
}
|
2026-04-11 08:34:23 +00:00
|
|
|
}
|
|
|
|
|
|
2026-05-25 06:26:58 +00:00
|
|
|
Rectangle {
|
|
|
|
|
x: convergenceChrome.workAreaX
|
|
|
|
|
y: convergenceChrome.workAreaY
|
|
|
|
|
width: convergenceChrome.workAreaWidth
|
|
|
|
|
height: convergenceChrome.workAreaHeight
|
|
|
|
|
radius: convergenceChrome.frameRadius
|
|
|
|
|
color: "transparent"
|
|
|
|
|
border.width: 1
|
|
|
|
|
border.color: convergenceChrome.edgeColor
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: dockSurface
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
height: convergenceChrome.dockHeight
|
|
|
|
|
color: "transparent"
|
|
|
|
|
|
|
|
|
|
HoverHandler {
|
|
|
|
|
id: dockHoverHandler
|
|
|
|
|
onHoveredChanged: {
|
|
|
|
|
if (hovered) {
|
|
|
|
|
hoverRevealTimer.start()
|
|
|
|
|
} else {
|
|
|
|
|
hoverRevealTimer.stop()
|
|
|
|
|
convergenceChrome.hoverRevealing = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
visible: !convergenceChrome.shouldHide || convergenceChrome.dockOffset < convergenceChrome.dockHeight
|
|
|
|
|
color: convergenceChrome.chromeColor
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FavouritesBar {
|
|
|
|
|
id: dockOverlayBar
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
folio: root.folio
|
|
|
|
|
maskManager: root.maskManager
|
|
|
|
|
homeScreen: folioHomeScreen
|
|
|
|
|
suppressRunningTasks: runningAppsPanel.visible
|
|
|
|
|
transform: Translate { y: convergenceChrome.dockOffset }
|
|
|
|
|
// Dock is an opaque panel — use Window colorset so all content
|
|
|
|
|
// (labels, hover highlights, icon tints) follows the system theme
|
|
|
|
|
// instead of the containment's Complementary wallpaper context.
|
|
|
|
|
Kirigami.Theme.inherit: false
|
|
|
|
|
Kirigami.Theme.colorSet: Kirigami.Theme.Window
|
|
|
|
|
}
|
2026-04-11 07:42:21 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-15 08:18:34 +00:00
|
|
|
// App-drawer overlay — renders the popup drawer above application
|
|
|
|
|
// windows in convergence mode. Same pattern as the dock overlay:
|
|
|
|
|
// a fullscreen layer-shell surface at LayerTop so that it appears
|
|
|
|
|
// over normal windows without minimizing them.
|
|
|
|
|
Window {
|
|
|
|
|
id: drawerOverlay
|
|
|
|
|
visible: ShellSettings.Settings.convergenceModeEnabled
|
2026-04-19 11:51:08 +00:00
|
|
|
&& !ShellSettings.Settings.gamingModeEnabled
|
2026-04-15 08:18:34 +00:00
|
|
|
&& folio.HomeScreenState.appDrawerOpenProgress > 0
|
|
|
|
|
color: "transparent"
|
|
|
|
|
width: Screen.width
|
|
|
|
|
height: Screen.height
|
|
|
|
|
|
|
|
|
|
LayerShell.Window.scope: "drawer-overlay"
|
|
|
|
|
LayerShell.Window.layer: LayerShell.Window.LayerTop
|
|
|
|
|
LayerShell.Window.anchors: LayerShell.Window.AnchorTop | LayerShell.Window.AnchorBottom
|
|
|
|
|
| LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight
|
|
|
|
|
LayerShell.Window.exclusionZone: -1
|
|
|
|
|
LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityOnDemand
|
|
|
|
|
|
|
|
|
|
// Click outside the popup to dismiss
|
|
|
|
|
MouseArea {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
onClicked: folio.HomeScreenState.closeAppDrawer()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AppDrawer {
|
|
|
|
|
id: overlayDrawer
|
|
|
|
|
folio: root.folio
|
|
|
|
|
homeScreen: folioHomeScreen
|
|
|
|
|
|
|
|
|
|
readonly property real popupWidth: Math.min(Kirigami.Units.gridUnit * 28, parent.width * 0.5)
|
2026-05-04 06:43:10 +00:00
|
|
|
readonly property real dockHeight: MobileShell.Constants.convergenceDockHeight
|
2026-05-23 13:58:56 +00:00
|
|
|
readonly property real sideInset: MobileShell.Constants.convergenceWorkspaceFrameThickness
|
|
|
|
|
readonly property real connectedPanelGap: 0
|
2026-05-19 07:13:25 +00:00
|
|
|
readonly property real popupTopY: MobileShell.Constants.topPanelHeight
|
|
|
|
|
+ MobileShell.Constants.convergenceWorkspaceFrameThickness
|
|
|
|
|
readonly property real popupBottomY: parent.height
|
|
|
|
|
- dockHeight
|
|
|
|
|
- MobileShell.Constants.convergenceWorkspaceFrameThickness
|
|
|
|
|
readonly property real popupHeight: Math.max(0, popupBottomY - popupTopY)
|
2026-04-15 08:18:34 +00:00
|
|
|
|
|
|
|
|
width: popupWidth
|
|
|
|
|
height: popupHeight
|
|
|
|
|
|
|
|
|
|
opacity: folio.HomeScreenState.appDrawerOpenProgress < 0.5
|
|
|
|
|
? 0 : (folio.HomeScreenState.appDrawerOpenProgress - 0.5) * 2
|
|
|
|
|
|
|
|
|
|
property real animationY: (1 - folio.HomeScreenState.appDrawerOpenProgress) * (Kirigami.Units.gridUnit * 2)
|
|
|
|
|
|
2026-05-23 13:58:56 +00:00
|
|
|
x: sideInset
|
2026-04-15 08:18:34 +00:00
|
|
|
y: (opacity > 0)
|
2026-05-19 07:13:25 +00:00
|
|
|
? popupTopY + animationY
|
2026-04-15 08:18:34 +00:00
|
|
|
: parent.height
|
|
|
|
|
|
|
|
|
|
headerHeight: Math.round(Kirigami.Units.gridUnit * 3)
|
|
|
|
|
headerItem: AppDrawerHeader {
|
|
|
|
|
id: overlayDrawerHeader
|
|
|
|
|
folio: root.folio
|
|
|
|
|
onReleaseFocusRequested: overlayDrawer.forceActiveFocus()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Keys.onPressed: (event) => {
|
|
|
|
|
if (event.text.trim().length > 0) {
|
|
|
|
|
overlayDrawerHeader.addSearchText(event.text);
|
|
|
|
|
overlayDrawerHeader.forceActiveFocus();
|
|
|
|
|
event.accepted = true;
|
|
|
|
|
} else if (event.key === Qt.Key_Left || event.key === Qt.Key_Right
|
|
|
|
|
|| event.key === Qt.Key_Up || event.key === Qt.Key_Down) {
|
|
|
|
|
overlayDrawerHeader.forceActiveFocus();
|
|
|
|
|
event.accepted = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
|
target: folio.HomeScreenState
|
|
|
|
|
|
|
|
|
|
function onAppDrawerOpened() {
|
2026-04-18 10:33:11 +00:00
|
|
|
folio.ApplicationListSearchModel.categoryFilter = ""
|
|
|
|
|
overlayDrawer.forceActiveFocus()
|
2026-04-15 08:18:34 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-04-17 11:56:08 +00:00
|
|
|
|
2026-04-18 10:33:11 +00:00
|
|
|
CategoryPanel {
|
|
|
|
|
id: categoryPanel
|
|
|
|
|
folio: root.folio
|
|
|
|
|
|
|
|
|
|
width: Kirigami.Units.gridUnit * 9
|
|
|
|
|
height: overlayDrawer.popupHeight
|
2026-05-23 13:58:56 +00:00
|
|
|
x: overlayDrawer.x + overlayDrawer.width + overlayDrawer.connectedPanelGap
|
2026-04-18 10:33:11 +00:00
|
|
|
y: overlayDrawer.y
|
|
|
|
|
opacity: overlayDrawer.opacity
|
|
|
|
|
|
|
|
|
|
onCategorySelected: (catId) => {
|
|
|
|
|
folio.ApplicationListSearchModel.categoryFilter = catId
|
|
|
|
|
overlayDrawerHeader.clearSearchText()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-18 09:07:48 +00:00
|
|
|
Rectangle {
|
|
|
|
|
id: powerPanel
|
|
|
|
|
|
|
|
|
|
// Width: just enough for one icon button + side margins
|
|
|
|
|
readonly property real tileSize: Kirigami.Units.iconSizes.medium + 2 * Kirigami.Units.largeSpacing
|
|
|
|
|
|
|
|
|
|
width: tileSize
|
|
|
|
|
height: overlayDrawer.popupHeight
|
2026-04-29 10:10:31 +00:00
|
|
|
x: runningAppsPanel.visible
|
2026-05-23 13:58:56 +00:00
|
|
|
? runningAppsPanel.x + runningAppsPanel.width + overlayDrawer.connectedPanelGap
|
|
|
|
|
: categoryPanel.x + categoryPanel.width + overlayDrawer.connectedPanelGap
|
2026-04-18 09:07:48 +00:00
|
|
|
y: overlayDrawer.y
|
|
|
|
|
opacity: overlayDrawer.opacity
|
2026-05-23 13:58:56 +00:00
|
|
|
radius: 0
|
2026-05-24 13:49:08 +00:00
|
|
|
color: "transparent"
|
2026-04-17 11:56:08 +00:00
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-18 09:07:48 +00:00
|
|
|
KCoreAddons.KUser {
|
|
|
|
|
id: kuser
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-17 11:56:08 +00:00
|
|
|
SessionManagement {
|
|
|
|
|
id: powerSession
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-18 09:27:24 +00:00
|
|
|
// Close button anchored to top — smaller than power icons
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: closeButton
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
anchors.margins: Kirigami.Units.smallSpacing
|
|
|
|
|
height: Kirigami.Units.iconSizes.smallMedium + 2 * Kirigami.Units.smallSpacing
|
|
|
|
|
radius: Kirigami.Units.cornerRadius
|
|
|
|
|
color: closeArea.containsPress
|
|
|
|
|
? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.2)
|
|
|
|
|
: closeArea.containsMouse
|
|
|
|
|
? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1)
|
|
|
|
|
: "transparent"
|
|
|
|
|
Kirigami.Icon {
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
width: Kirigami.Units.iconSizes.smallMedium
|
|
|
|
|
height: width
|
|
|
|
|
source: "window-close-symbolic"
|
|
|
|
|
active: closeArea.containsMouse
|
2026-05-17 06:57:06 +00:00
|
|
|
isMask: true
|
|
|
|
|
color: Kirigami.Theme.textColor
|
2026-04-18 09:27:24 +00:00
|
|
|
}
|
|
|
|
|
PlasmaComponents.ToolTip {
|
|
|
|
|
text: i18n("Close")
|
|
|
|
|
visible: closeArea.containsMouse
|
|
|
|
|
}
|
|
|
|
|
MouseArea {
|
|
|
|
|
id: closeArea
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
onClicked: folio.HomeScreenState.closeAppDrawer()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Separator below close button
|
|
|
|
|
Rectangle {
|
|
|
|
|
anchors.top: closeButton.bottom
|
|
|
|
|
anchors.topMargin: Kirigami.Units.smallSpacing
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
anchors.leftMargin: Kirigami.Units.smallSpacing
|
|
|
|
|
anchors.rightMargin: Kirigami.Units.smallSpacing
|
|
|
|
|
height: 1
|
|
|
|
|
color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.15)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Power buttons centred vertically in the panel
|
2026-04-17 11:56:08 +00:00
|
|
|
Column {
|
2026-04-18 09:07:48 +00:00
|
|
|
id: powerColumn
|
2026-04-18 09:27:24 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2026-04-18 09:07:48 +00:00
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
anchors.margins: Kirigami.Units.smallSpacing
|
2026-04-17 11:56:08 +00:00
|
|
|
spacing: Kirigami.Units.smallSpacing
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
width: parent.width
|
2026-04-18 09:07:48 +00:00
|
|
|
height: width
|
2026-04-17 11:56:08 +00:00
|
|
|
radius: Kirigami.Units.cornerRadius
|
|
|
|
|
color: lockArea.containsPress
|
|
|
|
|
? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.2)
|
|
|
|
|
: lockArea.containsMouse
|
|
|
|
|
? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1)
|
|
|
|
|
: "transparent"
|
2026-04-18 09:07:48 +00:00
|
|
|
Kirigami.Icon {
|
2026-04-17 11:56:08 +00:00
|
|
|
anchors.centerIn: parent
|
2026-04-18 09:07:48 +00:00
|
|
|
width: Kirigami.Units.iconSizes.medium
|
|
|
|
|
height: width
|
|
|
|
|
source: "system-lock-screen"
|
|
|
|
|
active: lockArea.containsMouse
|
2026-05-17 06:57:06 +00:00
|
|
|
isMask: true
|
|
|
|
|
color: Kirigami.Theme.textColor
|
2026-04-18 09:07:48 +00:00
|
|
|
}
|
|
|
|
|
PlasmaComponents.ToolTip {
|
|
|
|
|
text: i18n("Lock Screen")
|
|
|
|
|
visible: lockArea.containsMouse
|
2026-04-17 11:56:08 +00:00
|
|
|
}
|
|
|
|
|
MouseArea {
|
|
|
|
|
id: lockArea
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
onClicked: {
|
|
|
|
|
powerSession.lock()
|
|
|
|
|
folio.HomeScreenState.closeAppDrawer()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
width: parent.width
|
2026-04-18 09:07:48 +00:00
|
|
|
height: width
|
2026-04-17 11:56:08 +00:00
|
|
|
radius: Kirigami.Units.cornerRadius
|
|
|
|
|
color: rebootArea.containsPress
|
|
|
|
|
? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.2)
|
|
|
|
|
: rebootArea.containsMouse
|
|
|
|
|
? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1)
|
|
|
|
|
: "transparent"
|
2026-04-18 09:07:48 +00:00
|
|
|
Kirigami.Icon {
|
2026-04-17 11:56:08 +00:00
|
|
|
anchors.centerIn: parent
|
2026-04-18 09:07:48 +00:00
|
|
|
width: Kirigami.Units.iconSizes.medium
|
|
|
|
|
height: width
|
|
|
|
|
source: "system-reboot"
|
|
|
|
|
active: rebootArea.containsMouse
|
2026-05-17 06:57:06 +00:00
|
|
|
isMask: true
|
|
|
|
|
color: Kirigami.Theme.textColor
|
2026-04-18 09:07:48 +00:00
|
|
|
}
|
|
|
|
|
PlasmaComponents.ToolTip {
|
|
|
|
|
text: i18n("Restart")
|
|
|
|
|
visible: rebootArea.containsMouse
|
2026-04-17 11:56:08 +00:00
|
|
|
}
|
|
|
|
|
MouseArea {
|
|
|
|
|
id: rebootArea
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
onClicked: {
|
|
|
|
|
folio.HomeScreenState.closeAppDrawer()
|
|
|
|
|
powerSession.requestReboot()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
width: parent.width
|
2026-04-18 09:07:48 +00:00
|
|
|
height: width
|
2026-04-17 11:56:08 +00:00
|
|
|
radius: Kirigami.Units.cornerRadius
|
|
|
|
|
color: shutdownArea.containsPress
|
|
|
|
|
? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.2)
|
|
|
|
|
: shutdownArea.containsMouse
|
|
|
|
|
? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1)
|
|
|
|
|
: "transparent"
|
2026-04-18 09:07:48 +00:00
|
|
|
Kirigami.Icon {
|
2026-04-17 11:56:08 +00:00
|
|
|
anchors.centerIn: parent
|
2026-04-18 09:07:48 +00:00
|
|
|
width: Kirigami.Units.iconSizes.medium
|
|
|
|
|
height: width
|
|
|
|
|
source: "system-shutdown"
|
|
|
|
|
active: shutdownArea.containsMouse
|
2026-05-17 06:57:06 +00:00
|
|
|
isMask: true
|
|
|
|
|
color: Kirigami.Theme.textColor
|
2026-04-18 09:07:48 +00:00
|
|
|
}
|
|
|
|
|
PlasmaComponents.ToolTip {
|
|
|
|
|
text: i18n("Shut Down")
|
|
|
|
|
visible: shutdownArea.containsMouse
|
2026-04-17 11:56:08 +00:00
|
|
|
}
|
|
|
|
|
MouseArea {
|
|
|
|
|
id: shutdownArea
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
onClicked: {
|
|
|
|
|
folio.HomeScreenState.closeAppDrawer()
|
|
|
|
|
powerSession.requestShutdown()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-04-18 09:07:48 +00:00
|
|
|
|
|
|
|
|
// Separator above user avatar
|
|
|
|
|
Rectangle {
|
|
|
|
|
anchors.bottom: userSection.top
|
|
|
|
|
anchors.bottomMargin: Kirigami.Units.smallSpacing
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
anchors.leftMargin: Kirigami.Units.smallSpacing
|
|
|
|
|
anchors.rightMargin: Kirigami.Units.smallSpacing
|
|
|
|
|
height: 1
|
|
|
|
|
color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.15)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// User avatar anchored to bottom — tooltip shows name, click opens user settings
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: userSection
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
anchors.margins: Kirigami.Units.smallSpacing
|
|
|
|
|
height: width
|
|
|
|
|
radius: Kirigami.Units.cornerRadius
|
|
|
|
|
color: userArea.containsPress
|
|
|
|
|
? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.2)
|
|
|
|
|
: userArea.containsMouse
|
|
|
|
|
? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1)
|
|
|
|
|
: "transparent"
|
|
|
|
|
|
|
|
|
|
KirigamiAddonsComponents.Avatar {
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
width: Kirigami.Units.iconSizes.medium
|
|
|
|
|
height: width
|
|
|
|
|
source: kuser.faceIconUrl
|
|
|
|
|
name: kuser.fullName || kuser.loginName
|
|
|
|
|
}
|
|
|
|
|
PlasmaComponents.ToolTip {
|
|
|
|
|
text: kuser.fullName || kuser.loginName
|
|
|
|
|
visible: userArea.containsMouse
|
|
|
|
|
}
|
|
|
|
|
MouseArea {
|
|
|
|
|
id: userArea
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
onClicked: {
|
|
|
|
|
KCM.KCMLauncher.openSystemSettings("kcm_users")
|
|
|
|
|
folio.HomeScreenState.closeAppDrawer()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-04-17 11:56:08 +00:00
|
|
|
}
|
2026-04-29 10:10:31 +00:00
|
|
|
|
|
|
|
|
RunningAppsPanel {
|
|
|
|
|
id: runningAppsPanel
|
|
|
|
|
folio: root.folio
|
|
|
|
|
|
2026-05-23 13:58:56 +00:00
|
|
|
x: categoryPanel.x + categoryPanel.width + overlayDrawer.connectedPanelGap
|
2026-04-29 10:10:31 +00:00
|
|
|
y: overlayDrawer.y
|
2026-05-23 13:58:56 +00:00
|
|
|
width: Math.max(0, parent.width - x - powerPanel.width - overlayDrawer.sideInset - overlayDrawer.connectedPanelGap)
|
2026-04-29 10:10:31 +00:00
|
|
|
height: overlayDrawer.popupHeight
|
|
|
|
|
opacity: overlayDrawer.opacity
|
|
|
|
|
visible: hasTasks && opacity > 0
|
|
|
|
|
|
|
|
|
|
onTaskActivated: folio.HomeScreenState.closeAppDrawer()
|
|
|
|
|
}
|
2026-05-24 13:49:08 +00:00
|
|
|
|
|
|
|
|
Shape {
|
|
|
|
|
id: drawerSurface
|
|
|
|
|
x: overlayDrawer.x
|
|
|
|
|
y: overlayDrawer.y
|
|
|
|
|
width: bodyWidth + cornerRadius
|
|
|
|
|
height: overlayDrawer.popupHeight
|
|
|
|
|
opacity: overlayDrawer.opacity
|
|
|
|
|
visible: opacity > 0 && bodyWidth > 0 && height > 0
|
|
|
|
|
z: -1
|
|
|
|
|
preferredRendererType: Shape.CurveRenderer
|
|
|
|
|
asynchronous: true
|
|
|
|
|
enabled: false
|
|
|
|
|
|
|
|
|
|
readonly property real bodyWidth: Math.max(0, powerPanel.x + powerPanel.width - overlayDrawer.x)
|
|
|
|
|
readonly property real cornerRadius: Math.min(MobileShell.Constants.convergenceWorkspaceFrameRadius,
|
|
|
|
|
Math.max(0.01, Math.min(bodyWidth, height) / 2))
|
|
|
|
|
|
|
|
|
|
ShapePath {
|
|
|
|
|
id: drawerSurfacePath
|
|
|
|
|
readonly property real cornerRadius: drawerSurface.cornerRadius
|
|
|
|
|
|
|
|
|
|
fillColor: Kirigami.Theme.backgroundColor
|
|
|
|
|
strokeWidth: 0
|
|
|
|
|
startX: 0
|
|
|
|
|
startY: 0
|
|
|
|
|
|
|
|
|
|
PathLine { x: drawerSurface.bodyWidth + drawerSurfacePath.cornerRadius; y: 0 }
|
|
|
|
|
PathArc { x: drawerSurface.bodyWidth; y: drawerSurfacePath.cornerRadius; radiusX: drawerSurfacePath.cornerRadius; radiusY: drawerSurfacePath.cornerRadius; direction: PathArc.Counterclockwise }
|
|
|
|
|
PathLine { x: drawerSurface.bodyWidth; y: drawerSurface.height - drawerSurfacePath.cornerRadius }
|
|
|
|
|
PathArc { x: drawerSurface.bodyWidth + drawerSurfacePath.cornerRadius; y: drawerSurface.height; radiusX: drawerSurfacePath.cornerRadius; radiusY: drawerSurfacePath.cornerRadius; direction: PathArc.Counterclockwise }
|
|
|
|
|
PathLine { x: 0; y: drawerSurface.height }
|
|
|
|
|
PathLine { x: 0; y: 0 }
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-04-15 08:18:34 +00:00
|
|
|
}
|
|
|
|
|
|
2026-04-19 11:51:08 +00:00
|
|
|
// Game Center overlay — full-screen grid of games shown when gaming mode
|
|
|
|
|
// is active. Sits at LayerTop so it covers running application windows
|
|
|
|
|
// without going above system notifications.
|
|
|
|
|
GameCenterOverlay {
|
|
|
|
|
id: gameCenterOverlay
|
|
|
|
|
folio: root.folio
|
|
|
|
|
visible: ShellSettings.Settings.gamingModeEnabled && root.gameCenterOpen
|
|
|
|
|
|
|
|
|
|
onGameStarted: root.gameCenterOpen = false
|
|
|
|
|
onDismissRequested: {
|
|
|
|
|
root.gameCenterOpen = false
|
|
|
|
|
if (ShellSettings.Settings.gamingDismissHintEnabled) {
|
|
|
|
|
root.showGameCenterHint = true
|
|
|
|
|
gameCenterHintTimer.restart()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Small persistent button at the top-right corner of the screen that lets
|
|
|
|
|
// the user return to the Game Center after launching a game.
|
2026-04-20 06:57:03 +00:00
|
|
|
// Keep the Loader active for the full duration of gaming mode so the
|
|
|
|
|
// opacity Behavior in GamingHUD can animate both fade-in and fade-out.
|
2026-04-25 07:48:50 +00:00
|
|
|
//
|
|
|
|
|
// Hide the HUD while a game window covers the screen. A mapped LayerShell
|
|
|
|
|
// surface prevents KWin from using DRM direct scanout for the fullscreen
|
|
|
|
|
// game window. Setting showing=false triggers the opacity fade-out and then
|
|
|
|
|
// sets visible=false, which unmaps the Wayland surface and lets KWin bypass
|
|
|
|
|
// the compositor render loop entirely for the game frame.
|
2026-04-19 12:10:51 +00:00
|
|
|
Loader {
|
2026-04-20 06:57:03 +00:00
|
|
|
active: ShellSettings.Settings.gamingModeEnabled
|
2026-04-19 12:10:51 +00:00
|
|
|
sourceComponent: GamingHUD {
|
2026-04-20 06:57:03 +00:00
|
|
|
visible: showing
|
2026-04-25 07:48:50 +00:00
|
|
|
showing: !root.gameCenterOpen && !windowMaximizedTracker.showingWindow
|
2026-04-19 12:10:51 +00:00
|
|
|
onOpenRequested: root.gameCenterOpen = true
|
|
|
|
|
}
|
2026-04-19 11:51:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: gameCenterHint
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.topMargin: Kirigami.Units.gridUnit * 2
|
|
|
|
|
visible: root.showGameCenterHint && ShellSettings.Settings.gamingDismissHintEnabled
|
|
|
|
|
opacity: visible ? 1 : 0
|
|
|
|
|
z: 2000
|
|
|
|
|
radius: Kirigami.Units.cornerRadius
|
|
|
|
|
color: Qt.rgba(0, 0, 0, 0.65)
|
|
|
|
|
border.width: 1
|
|
|
|
|
border.color: Qt.rgba(1, 1, 1, 0.2)
|
|
|
|
|
|
|
|
|
|
Behavior on opacity {
|
2026-05-21 09:13:36 +00:00
|
|
|
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
2026-04-19 11:51:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
implicitWidth: hintText.implicitWidth + Kirigami.Units.gridUnit * 2
|
|
|
|
|
implicitHeight: hintText.implicitHeight + Kirigami.Units.largeSpacing
|
|
|
|
|
|
|
|
|
|
PlasmaComponents.Label {
|
|
|
|
|
id: hintText
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
text: i18n("Gaming mode is still on. Use Home or the gamepad icon to reopen Game Center.")
|
|
|
|
|
color: "white"
|
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
|
width: Math.min(root.width * 0.8, Kirigami.Units.gridUnit * 30)
|
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-12 23:58:17 +00:00
|
|
|
MobileShell.HomeScreen {
|
|
|
|
|
id: homeScreen
|
2023-10-22 03:59:27 +00:00
|
|
|
anchors.fill: parent
|
2023-06-12 23:58:17 +00:00
|
|
|
|
2023-09-20 12:41:40 +00:00
|
|
|
plasmoidItem: root
|
2023-06-12 23:58:17 +00:00
|
|
|
onResetHomeScreenPosition: {
|
2023-10-22 03:59:27 +00:00
|
|
|
// NOTE: empty, because this is handled by homeAction()
|
2022-04-06 21:59:36 +00:00
|
|
|
}
|
2023-06-12 23:58:17 +00:00
|
|
|
|
2023-10-22 03:59:27 +00:00
|
|
|
onHomeTriggered: root.homeAction()
|
2023-06-12 23:58:17 +00:00
|
|
|
|
|
|
|
|
contentItem: Item {
|
|
|
|
|
// homescreen component
|
2025-07-16 17:02:18 +00:00
|
|
|
FolioHomeScreen {
|
2023-06-12 23:58:17 +00:00
|
|
|
id: folioHomeScreen
|
2024-06-21 04:42:14 +00:00
|
|
|
folio: root.folio
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
maskManager: root.maskManager
|
2023-06-12 23:58:17 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
|
|
topMargin: homeScreen.topMargin
|
|
|
|
|
bottomMargin: homeScreen.bottomMargin
|
|
|
|
|
leftMargin: homeScreen.leftMargin
|
|
|
|
|
rightMargin: homeScreen.rightMargin
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
|
2025-08-11 20:04:35 +00:00
|
|
|
// Ensure is the focused item at start
|
|
|
|
|
Component.onCompleted: forceActiveFocus()
|
|
|
|
|
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
onWallpaperSelectorTriggered: wallpaperSelectorLoader.active = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// top blur layer for items on top of the base homescreen
|
|
|
|
|
MobileShell.BlurEffect {
|
|
|
|
|
id: homescreenBlur
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
active: folio.FolioSettings.wallpaperBlurEffect > 1 && ((delegateDragItem.visible && folio.HomeScreenState.dragState.dropDelegate.type === Folio.FolioDelegate.Folder) || wallpaperSelectorLoader.active)
|
|
|
|
|
visible: active
|
|
|
|
|
fullBlur: 0
|
|
|
|
|
|
|
|
|
|
sourceLayer: homeScreenLayer
|
|
|
|
|
maskSourceLayer: frontMaskManager.maskLayer
|
|
|
|
|
|
|
|
|
|
// stacking both wallpaper and homescreen layers so we can blur them in one pass
|
|
|
|
|
Item {
|
|
|
|
|
id: homeScreenLayer
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
opacity: 0
|
|
|
|
|
|
|
|
|
|
// wallpaper blur
|
|
|
|
|
ShaderEffectSource {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
|
|
textureSize: homescreenBlur.textureSize
|
|
|
|
|
sourceItem: Plasmoid.wallpaperGraphicsObject
|
|
|
|
|
hideSource: false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// homescreen blur
|
|
|
|
|
ShaderEffectSource {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
|
|
textureSize: homescreenBlur.textureSize
|
|
|
|
|
sourceItem: homeScreen
|
|
|
|
|
hideSource: false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// drag and drop component
|
|
|
|
|
DelegateDragItem {
|
|
|
|
|
id: delegateDragItem
|
|
|
|
|
folio: root.folio
|
|
|
|
|
maskManager: root.frontMaskManager
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// drag and drop for widgets
|
|
|
|
|
WidgetDragItem {
|
|
|
|
|
id: widgetDragItem
|
|
|
|
|
folio: root.folio
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// loader for wallpaper selector
|
|
|
|
|
Loader {
|
|
|
|
|
id: wallpaperSelectorLoader
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
asynchronous: true
|
|
|
|
|
active: false
|
|
|
|
|
|
|
|
|
|
onLoaded: {
|
|
|
|
|
wallpaperSelectorLoader.item.open();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sourceComponent: MobileShell.WallpaperSelector {
|
|
|
|
|
maskManager: root.frontMaskManager
|
|
|
|
|
horizontal: root.width > root.height
|
|
|
|
|
edge: horizontal ? Qt.LeftEdge : Qt.BottomEdge
|
2026-05-04 07:47:40 +00:00
|
|
|
topMargin: horizontal ? folioHomeScreen.topMargin : 0
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
bottomMargin: horizontal ? 0 : folioHomeScreen.bottomMargin
|
|
|
|
|
leftMargin: horizontal ? folioHomeScreen.leftMargin : 0
|
|
|
|
|
rightMargin: horizontal ? folioHomeScreen.rightMargin : 0
|
|
|
|
|
onClosed: {
|
|
|
|
|
wallpaperSelectorLoader.active = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onWallpaperSettingsRequested: {
|
|
|
|
|
close();
|
|
|
|
|
folioHomeScreen.openConfigure();
|
2023-06-12 23:58:17 +00:00
|
|
|
}
|
2022-04-06 16:04:57 +00:00
|
|
|
}
|
|
|
|
|
}
|
2015-06-20 21:45:19 +00:00
|
|
|
}
|
2023-10-22 03:59:27 +00:00
|
|
|
|