2022-06-08 22:09:35 +00:00
|
|
|
// SPDX-FileCopyrightText: 2022 Devin Lin <espidev@gmail.com>
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
2023-03-05 02:40:06 +00:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import QtQuick.Controls as Controls
|
2023-05-12 23:43:49 +00:00
|
|
|
import QtQuick.Effects
|
2022-06-08 22:09:35 +00:00
|
|
|
|
2023-03-05 02:40:06 +00:00
|
|
|
import org.kde.plasma.core as PlasmaCore
|
2022-06-08 22:09:35 +00:00
|
|
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
|
|
|
|
import org.kde.kquickcontrolsaddons 2.0
|
|
|
|
|
|
2024-07-13 16:30:07 +00:00
|
|
|
import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager
|
2023-11-02 11:08:17 +00:00
|
|
|
import org.kde.plasma.private.mobileshell as MobileShell
|
2023-03-18 19:28:17 +00:00
|
|
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
2023-11-02 11:08:17 +00:00
|
|
|
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
2024-03-10 03:50:55 +00:00
|
|
|
import org.kde.plasma.plasmoid
|
2022-06-08 22:09:35 +00:00
|
|
|
|
|
|
|
|
import org.kde.kirigami 2.19 as Kirigami
|
|
|
|
|
|
2022-07-09 02:00:17 +00:00
|
|
|
Item {
|
2022-06-08 22:09:35 +00:00
|
|
|
id: delegate
|
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
|
2023-04-12 03:50:04 +00:00
|
|
|
|
2022-06-29 04:22:42 +00:00
|
|
|
property int visualIndex: 0
|
2022-07-09 16:05:58 +00:00
|
|
|
property real dragFolderAnimationProgress: 0
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-11 02:49:55 +00:00
|
|
|
property list<Kirigami.Action> menuActions
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
// whether this delegate is a folder
|
|
|
|
|
property bool isFolder
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
// folder object
|
|
|
|
|
property var folder
|
|
|
|
|
readonly property string folderName: folder ? folder.name : ""
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
// app object
|
|
|
|
|
property var application
|
2022-06-18 19:42:29 +00:00
|
|
|
readonly property string applicationName: application ? application.name : ""
|
|
|
|
|
readonly property string applicationStorageId: application ? application.storageId : ""
|
|
|
|
|
readonly property string applicationIcon: application ? application.icon : ""
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
signal folderOpenRequested()
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-09 02:00:17 +00:00
|
|
|
property alias drag: mouseArea.drag
|
|
|
|
|
Drag.active: delegate.drag.active
|
|
|
|
|
Drag.source: delegate
|
|
|
|
|
Drag.hotSpot.x: delegate.width / 2
|
|
|
|
|
Drag.hotSpot.y: delegate.height / 2
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-09 16:05:58 +00:00
|
|
|
// close context menu if drag move
|
|
|
|
|
onXChanged: {
|
|
|
|
|
if (dialogLoader.item) {
|
2023-03-08 11:53:01 +00:00
|
|
|
dialogLoader.item.close()
|
2022-07-09 16:05:58 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
onYChanged: {
|
|
|
|
|
if (dialogLoader.item) {
|
2023-03-08 11:53:01 +00:00
|
|
|
dialogLoader.item.close()
|
2022-07-09 16:05:58 +00:00
|
|
|
}
|
|
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-21 22:38:21 +00:00
|
|
|
function openContextMenu() {
|
2022-06-08 22:09:35 +00:00
|
|
|
dialogLoader.active = true;
|
2023-03-08 11:53:01 +00:00
|
|
|
dialogLoader.item.open();
|
2022-06-08 22:09:35 +00:00
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
function launch() {
|
|
|
|
|
if (isFolder) {
|
|
|
|
|
folderOpenRequested();
|
2022-06-08 22:09:35 +00:00
|
|
|
} else {
|
2022-06-30 04:40:22 +00:00
|
|
|
if (application.running) {
|
|
|
|
|
launchAppWithAnim(0, 0, "", applicationName, applicationStorageId);
|
|
|
|
|
} else {
|
2023-07-25 01:13:52 +00:00
|
|
|
launchAppWithAnim(delegate.x + (Kirigami.Units.smallSpacing * 2), delegate.y + (Kirigami.Units.smallSpacing * 2), delegate.applicationIcon, applicationName, applicationStorageId);
|
2022-06-30 04:40:22 +00:00
|
|
|
}
|
2022-06-08 22:09:35 +00:00
|
|
|
}
|
|
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
function launchAppWithAnim(x: int, y: int, source, title: string, storageId: string) {
|
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
|
|
|
if (source !== "") {
|
2024-03-10 03:50:55 +00:00
|
|
|
MobileShellState.ShellDBusClient.openAppLaunchAnimationWithPosition(
|
|
|
|
|
Plasmoid.screen,
|
|
|
|
|
source,
|
|
|
|
|
title,
|
2024-07-13 16:30:07 +00:00
|
|
|
storageId,
|
2024-03-10 03:50:55 +00:00
|
|
|
iconLoader.Kirigami.ScenePosition.x + iconLoader.width/2,
|
|
|
|
|
iconLoader.Kirigami.ScenePosition.y + iconLoader.height/2,
|
|
|
|
|
Math.min(iconLoader.width, iconLoader.height));
|
2022-06-30 04:40:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
application.setMinimizedDelegate(delegate);
|
2023-03-15 06:29:46 +00:00
|
|
|
MobileShell.AppLaunch.launchOrActivateApp(application.storageId);
|
2022-06-30 04:40:22 +00:00
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-08 22:09:35 +00:00
|
|
|
Loader {
|
|
|
|
|
id: dialogLoader
|
|
|
|
|
active: false
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2023-03-08 11:53:01 +00:00
|
|
|
sourceComponent: PlasmaComponents.Menu {
|
|
|
|
|
id: menu
|
2022-06-08 22:09:35 +00:00
|
|
|
title: label.text
|
2023-03-08 11:53:01 +00:00
|
|
|
closePolicy: PlasmaComponents.Menu.CloseOnReleaseOutside | PlasmaComponents.Menu.CloseOnEscape
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2023-03-08 11:53:01 +00:00
|
|
|
Repeater {
|
|
|
|
|
model: menuActions
|
|
|
|
|
delegate: PlasmaComponents.MenuItem {
|
|
|
|
|
icon.name: modelData.iconName
|
|
|
|
|
text: modelData.text
|
|
|
|
|
onClicked: modelData.triggered()
|
2022-07-11 02:49:55 +00:00
|
|
|
}
|
2022-06-08 22:09:35 +00:00
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2023-03-08 11:53:01 +00:00
|
|
|
onClosed: dialogLoader.active = false
|
2022-06-08 22:09:35 +00:00
|
|
|
}
|
|
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-09 02:00:17 +00:00
|
|
|
MouseArea {
|
|
|
|
|
id: mouseArea
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-23 22:14:12 +00:00
|
|
|
anchors.fill: parent
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-09 02:00:17 +00:00
|
|
|
property bool inDrag: false
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-13 01:02:04 +00:00
|
|
|
cursorShape: Qt.PointingHandCursor
|
2022-07-09 02:00:17 +00:00
|
|
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
|
|
|
|
onReleased: {
|
2022-07-09 16:05:58 +00:00
|
|
|
delegate.Drag.drop();
|
2022-07-09 02:00:17 +00:00
|
|
|
inDrag = false;
|
|
|
|
|
}
|
|
|
|
|
onPressAndHold: { inDrag = true; openContextMenu() }
|
|
|
|
|
drag.target: inDrag ? delegate : undefined
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-13 01:02:04 +00:00
|
|
|
// grow/shrink animation
|
|
|
|
|
property real zoomScale: 1
|
2023-04-11 05:16:43 +00:00
|
|
|
transform: Scale {
|
2024-07-13 16:30:07 +00:00
|
|
|
origin.x: mouseArea.width / 2;
|
|
|
|
|
origin.y: mouseArea.height / 2;
|
2022-07-13 01:02:04 +00:00
|
|
|
xScale: mouseArea.zoomScale
|
|
|
|
|
yScale: mouseArea.zoomScale
|
|
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-13 01:02:04 +00:00
|
|
|
property bool launchAppRequested: false
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-13 01:02:04 +00:00
|
|
|
NumberAnimation on zoomScale {
|
|
|
|
|
id: shrinkAnim
|
|
|
|
|
running: false
|
2023-03-18 19:28:17 +00:00
|
|
|
duration: ShellSettings.Settings.animationsEnabled ? 80 : 1
|
|
|
|
|
to: ShellSettings.Settings.animationsEnabled ? 0.95 : 1
|
2022-07-13 01:02:04 +00:00
|
|
|
onFinished: {
|
|
|
|
|
if (!mouseArea.pressed) {
|
|
|
|
|
growAnim.restart();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-13 01:02:04 +00:00
|
|
|
NumberAnimation on zoomScale {
|
|
|
|
|
id: growAnim
|
|
|
|
|
running: false
|
2023-03-18 19:28:17 +00:00
|
|
|
duration: ShellSettings.Settings.animationsEnabled ? 80 : 1
|
2022-07-13 01:02:04 +00:00
|
|
|
to: 1
|
|
|
|
|
onFinished: {
|
|
|
|
|
if (mouseArea.launchAppRequested) {
|
|
|
|
|
delegate.launch();
|
|
|
|
|
mouseArea.launchAppRequested = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-13 01:02:04 +00:00
|
|
|
onPressedChanged: {
|
|
|
|
|
if (pressed) {
|
|
|
|
|
growAnim.stop();
|
|
|
|
|
shrinkAnim.restart();
|
|
|
|
|
} else if (!pressed && !shrinkAnim.running) {
|
|
|
|
|
growAnim.restart();
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-13 01:02:04 +00:00
|
|
|
// launch app handled by press animation
|
2023-03-06 13:09:54 +00:00
|
|
|
onClicked: mouse => {
|
2023-04-11 05:16:43 +00:00
|
|
|
if (mouse.button === Qt.RightButton) {
|
|
|
|
|
openContextMenu();
|
|
|
|
|
} else {
|
|
|
|
|
launchAppRequested = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-29 04:22:42 +00:00
|
|
|
Rectangle {
|
|
|
|
|
anchors.fill: parent
|
2024-07-13 16:30:07 +00:00
|
|
|
radius: height / 2
|
2022-07-13 01:02:04 +00:00
|
|
|
color: mouseArea.pressed ? Qt.rgba(255, 255, 255, 0.2) : "transparent"
|
2022-06-23 22:14:12 +00:00
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-29 04:22:42 +00:00
|
|
|
RowLayout {
|
|
|
|
|
id: rowLayout
|
|
|
|
|
anchors {
|
|
|
|
|
fill: parent
|
2023-07-25 01:13:52 +00:00
|
|
|
leftMargin: Kirigami.Units.smallSpacing * 2
|
|
|
|
|
topMargin: Kirigami.Units.smallSpacing
|
|
|
|
|
rightMargin: Kirigami.Units.smallSpacing * 2
|
|
|
|
|
bottomMargin: Kirigami.Units.smallSpacing
|
2022-06-23 22:14:12 +00:00
|
|
|
}
|
2022-06-29 04:22:42 +00:00
|
|
|
spacing: 0
|
|
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
Loader {
|
|
|
|
|
id: iconLoader
|
2022-06-29 04:22:42 +00:00
|
|
|
Layout.alignment: Qt.AlignLeft
|
|
|
|
|
Layout.minimumWidth: Layout.minimumHeight
|
|
|
|
|
Layout.preferredWidth: Layout.minimumHeight
|
|
|
|
|
Layout.minimumHeight: parent.height
|
|
|
|
|
Layout.preferredHeight: Layout.minimumHeight
|
|
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
sourceComponent: delegate.isFolder ? folderIconComponent : appIconComponent
|
2022-06-08 22:09:35 +00:00
|
|
|
}
|
2022-06-23 22:14:12 +00:00
|
|
|
|
2022-06-29 04:22:42 +00:00
|
|
|
PlasmaComponents.Label {
|
|
|
|
|
id: label
|
|
|
|
|
visible: text.length > 0
|
2022-07-12 04:21:14 +00:00
|
|
|
textFormat: Text.MarkdownText
|
2022-06-29 04:22:42 +00:00
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
2023-07-25 01:13:52 +00:00
|
|
|
Layout.leftMargin: Kirigami.Units.smallSpacing * 2
|
|
|
|
|
Layout.rightMargin: Kirigami.Units.gridUnit
|
2022-06-29 04:22:42 +00:00
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
|
maximumLineCount: 1
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
text: delegate.isFolder ? delegate.folderName : delegate.applicationName
|
2022-06-29 04:22:42 +00:00
|
|
|
|
2023-07-25 01:13:52 +00:00
|
|
|
font.pointSize: Kirigami.Theme.defaultFont.pointSize
|
2022-06-29 04:22:42 +00:00
|
|
|
font.weight: Font.Bold
|
|
|
|
|
color: "white"
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-29 04:22:42 +00:00
|
|
|
layer.enabled: true
|
2023-05-12 23:43:49 +00:00
|
|
|
layer.effect: MobileShell.TextDropShadow {}
|
2022-06-08 22:09:35 +00:00
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
Kirigami.Icon {
|
|
|
|
|
Layout.alignment: Qt.AlignRight
|
2022-07-01 04:00:15 +00:00
|
|
|
Layout.preferredWidth: Kirigami.Units.iconSizes.small
|
|
|
|
|
Layout.preferredHeight: Kirigami.Units.iconSizes.small
|
2022-06-30 04:40:22 +00:00
|
|
|
|
|
|
|
|
isMask: true
|
|
|
|
|
color: 'white'
|
|
|
|
|
source: 'arrow-right'
|
|
|
|
|
visible: delegate.isFolder
|
|
|
|
|
|
|
|
|
|
layer.enabled: true
|
2023-05-12 23:43:49 +00:00
|
|
|
layer.effect: MultiEffect {
|
|
|
|
|
shadowEnabled: true
|
|
|
|
|
shadowVerticalOffset: 1
|
|
|
|
|
blurMax: 8
|
|
|
|
|
shadowOpacity: 0.7
|
2022-06-30 04:40:22 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
Component {
|
|
|
|
|
id: appIconComponent
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-09 16:05:58 +00:00
|
|
|
Item {
|
2022-06-30 04:40:22 +00:00
|
|
|
Rectangle {
|
2022-07-09 16:05:58 +00:00
|
|
|
anchors.fill: parent
|
2023-07-25 01:13:52 +00:00
|
|
|
anchors.margins: Kirigami.Units.smallSpacing
|
2022-07-09 16:05:58 +00:00
|
|
|
color: Qt.rgba(255, 255, 255, 0.2)
|
2024-07-27 04:02:05 +00:00
|
|
|
radius: Kirigami.Units.cornerRadius
|
2022-07-09 16:05:58 +00:00
|
|
|
opacity: delegate.dragFolderAnimationProgress
|
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
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
|
if (maskManager) {
|
|
|
|
|
maskManager.assignToMask(this)
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-06-30 04:40:22 +00:00
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2023-08-18 09:08:07 +00:00
|
|
|
Kirigami.Icon {
|
2022-07-09 16:05:58 +00:00
|
|
|
id: icon
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
source: delegate.isFolder ? 'document-open-folder' : delegate.applicationIcon
|
2024-07-13 16:30:07 +00:00
|
|
|
|
|
|
|
|
transform: Scale {
|
|
|
|
|
origin.x: icon.width / 2
|
2022-07-09 16:05:58 +00:00
|
|
|
origin.y: icon.height / 2
|
|
|
|
|
xScale: 1 - delegate.dragFolderAnimationProgress * 0.5
|
|
|
|
|
yScale: 1 - delegate.dragFolderAnimationProgress * 0.5
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
anchors {
|
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
|
bottom: parent.bottom
|
|
|
|
|
}
|
|
|
|
|
visible: application ? application.running : false
|
|
|
|
|
radius: width
|
2023-07-25 01:13:52 +00:00
|
|
|
width: Kirigami.Units.smallSpacing
|
2022-07-09 16:05:58 +00:00
|
|
|
height: width
|
2023-07-25 01:13:52 +00:00
|
|
|
color: Kirigami.Theme.highlightColor
|
2022-07-09 16:05:58 +00:00
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-09 16:05:58 +00:00
|
|
|
layer.enabled: true
|
2023-05-12 23:43:49 +00:00
|
|
|
layer.effect: MultiEffect {
|
|
|
|
|
shadowEnabled: true
|
|
|
|
|
shadowVerticalOffset: 1
|
|
|
|
|
blurMax: 16
|
|
|
|
|
shadowOpacity: 0.5
|
2022-07-09 16:05:58 +00:00
|
|
|
}
|
2022-06-30 04:40:22 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
Component {
|
|
|
|
|
id: folderIconComponent
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-06-30 04:40:22 +00:00
|
|
|
Item {
|
|
|
|
|
Rectangle {
|
2022-07-09 16:05:58 +00:00
|
|
|
id: rect
|
2022-06-30 04:40:22 +00:00
|
|
|
anchors.fill: parent
|
2023-07-25 01:13:52 +00:00
|
|
|
anchors.margins: Kirigami.Units.smallSpacing
|
2022-06-30 04:40:22 +00:00
|
|
|
color: Qt.rgba(255, 255, 255, 0.2)
|
2024-07-27 04:02:05 +00:00
|
|
|
radius: Kirigami.Units.cornerRadius
|
2024-07-13 16:30:07 +00:00
|
|
|
|
|
|
|
|
transform: Scale {
|
|
|
|
|
origin.x: rect.width / 2
|
2022-07-09 16:05:58 +00:00
|
|
|
origin.y: rect.height / 2
|
|
|
|
|
xScale: 1 + delegate.dragFolderAnimationProgress * 0.5
|
|
|
|
|
yScale: 1 + delegate.dragFolderAnimationProgress * 0.5
|
|
|
|
|
}
|
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
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
|
if (maskManager) {
|
|
|
|
|
maskManager.assignToMask(this)
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-07-09 16:05:58 +00:00
|
|
|
}
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-09 16:05:58 +00:00
|
|
|
Grid {
|
|
|
|
|
id: grid
|
|
|
|
|
anchors.fill: parent
|
2023-07-25 01:13:52 +00:00
|
|
|
anchors.margins: Kirigami.Units.smallSpacing * 2
|
2022-07-09 16:05:58 +00:00
|
|
|
columns: 2
|
2023-07-25 01:13:52 +00:00
|
|
|
spacing: Kirigami.Units.smallSpacing
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-09 16:05:58 +00:00
|
|
|
property var previews: model.folder.appPreviews
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-09 16:05:58 +00:00
|
|
|
Repeater {
|
|
|
|
|
model: grid.previews
|
|
|
|
|
delegate: Kirigami.Icon {
|
2023-07-25 01:13:52 +00:00
|
|
|
implicitWidth: (grid.width - Kirigami.Units.smallSpacing) / 2
|
|
|
|
|
implicitHeight: (grid.width - Kirigami.Units.smallSpacing) / 2
|
2022-07-09 16:05:58 +00:00
|
|
|
source: modelData.icon
|
2024-07-13 16:30:07 +00:00
|
|
|
|
2022-07-09 16:05:58 +00:00
|
|
|
layer.enabled: true
|
2023-05-12 23:43:49 +00:00
|
|
|
layer.effect: MultiEffect {
|
|
|
|
|
shadowEnabled: true
|
|
|
|
|
shadowVerticalOffset: 1
|
|
|
|
|
blurMax: 16
|
|
|
|
|
shadowOpacity: 0.6
|
2022-06-30 04:40:22 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-06-08 22:09:35 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|