mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
homescreens/folio: Use MultiEffect for blur and blur behind task switcher
This commit is contained in:
parent
c8aef0d208
commit
871bee83c0
2 changed files with 14 additions and 7 deletions
|
|
@ -59,6 +59,11 @@ Item {
|
||||||
property real leftMargin
|
property real leftMargin
|
||||||
property real rightMargin
|
property real rightMargin
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The opacity value that the homescreen content gets.
|
||||||
|
*/
|
||||||
|
readonly property real contentOpacity: itemContainer.opacity
|
||||||
|
|
||||||
function evaluateMargins() {
|
function evaluateMargins() {
|
||||||
topMargin = plasmoidItem.availableScreenRect.y
|
topMargin = plasmoidItem.availableScreenRect.y
|
||||||
bottomMargin = root.height - (plasmoidItem.availableScreenRect.y + plasmoidItem.availableScreenRect.height)
|
bottomMargin = root.height - (plasmoidItem.availableScreenRect.y + plasmoidItem.availableScreenRect.height)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
||||||
// SPDX-License-Identifier: LGPL-2.0-or-later
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Effects
|
||||||
|
|
||||||
import org.kde.kirigami 2.20 as Kirigami
|
import org.kde.kirigami 2.20 as Kirigami
|
||||||
|
|
||||||
|
|
@ -15,8 +16,6 @@ import org.kde.plasma.private.mobileshell.state as MobileShellState
|
||||||
import org.kde.private.mobile.homescreen.folio 1.0 as Folio
|
import org.kde.private.mobile.homescreen.folio 1.0 as Folio
|
||||||
import org.kde.plasma.private.mobileshell.windowplugin as WindowPlugin
|
import org.kde.plasma.private.mobileshell.windowplugin as WindowPlugin
|
||||||
|
|
||||||
import Qt5Compat.GraphicalEffects
|
|
||||||
|
|
||||||
ContainmentItem {
|
ContainmentItem {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
|
@ -31,11 +30,14 @@ ContainmentItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
// wallpaper blur
|
// wallpaper blur
|
||||||
FastBlur {
|
MultiEffect {
|
||||||
radius: 50
|
blurEnabled: true
|
||||||
|
blur: 1.0
|
||||||
|
blurMax: 50
|
||||||
source: Plasmoid.wallpaperGraphicsObject
|
source: Plasmoid.wallpaperGraphicsObject
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
opacity: Math.max(
|
opacity: Math.max(
|
||||||
|
1 - homeScreen.contentOpacity,
|
||||||
Folio.HomeScreenState.appDrawerOpenProgress,
|
Folio.HomeScreenState.appDrawerOpenProgress,
|
||||||
Folio.HomeScreenState.searchWidgetOpenProgress,
|
Folio.HomeScreenState.searchWidgetOpenProgress,
|
||||||
Folio.HomeScreenState.folderOpenProgress
|
Folio.HomeScreenState.folderOpenProgress
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue