mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-24 20:15:21 -04:00
feat(wallpaper): preload thumbnails & switch/sort options
- add sorting and clickable page jump - wrap-around page navigation
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
|
||||
// Frosted-glass backdrop: blurs the region of sourceItem directly behind the item
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property Item sourceItem: null
|
||||
property real radius: Theme.cornerRadius
|
||||
property real blurAmount: 1.0
|
||||
property int blurMax: 96
|
||||
|
||||
readonly property bool blurActive: visible && BlurService.enabled
|
||||
|
||||
ShaderEffectSource {
|
||||
id: snapshot
|
||||
anchors.fill: parent
|
||||
sourceItem: root.sourceItem
|
||||
sourceRect: {
|
||||
if (!root.sourceItem)
|
||||
return Qt.rect(0, 0, 0, 0);
|
||||
const p = root.mapToItem(root.sourceItem, 0, 0);
|
||||
return Qt.rect(p.x, p.y, root.width, root.height);
|
||||
}
|
||||
live: root.blurActive
|
||||
hideSource: false
|
||||
visible: false
|
||||
}
|
||||
|
||||
MultiEffect {
|
||||
anchors.fill: parent
|
||||
source: snapshot
|
||||
visible: root.blurActive
|
||||
blurEnabled: root.blurActive
|
||||
blurMax: root.blurMax
|
||||
blur: root.blurAmount
|
||||
maskEnabled: true
|
||||
maskSource: maskRect
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: maskRect
|
||||
anchors.fill: parent
|
||||
radius: root.radius
|
||||
visible: false
|
||||
layer.enabled: true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user