internal: use layer.effect
Also use clipping rect for wallpaper item
This commit is contained in:
parent
de476f2e38
commit
d7802f3c4b
8 changed files with 86 additions and 132 deletions
|
|
@ -184,11 +184,18 @@ MouseArea {
|
|||
}
|
||||
|
||||
StyledRect {
|
||||
id: background
|
||||
|
||||
anchors.fill: parent
|
||||
color: Colours.palette.m3secondaryContainer
|
||||
visible: false
|
||||
opacity: 0.3
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
maskSource: selectionWrapper
|
||||
maskEnabled: true
|
||||
maskInverted: true
|
||||
maskSpreadAtMin: 1
|
||||
maskThresholdMin: 0.5
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
|
|
@ -209,17 +216,6 @@ MouseArea {
|
|||
}
|
||||
}
|
||||
|
||||
MultiEffect {
|
||||
anchors.fill: parent
|
||||
source: background
|
||||
maskSource: selectionWrapper
|
||||
maskEnabled: true
|
||||
maskInverted: true
|
||||
maskSpreadAtMin: 1
|
||||
maskThresholdMin: 0.5
|
||||
opacity: 0.3
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
radius: root.realRounding > 0 ? root.realRounding + root.realBorderWidth : 0
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/widgets"
|
||||
import "root:/services"
|
||||
import "root:/config"
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
|
||||
|
|
@ -13,11 +14,17 @@ Item {
|
|||
anchors.fill: parent
|
||||
|
||||
StyledRect {
|
||||
id: rect
|
||||
|
||||
anchors.fill: parent
|
||||
color: Colours.alpha(Colours.palette.m3surface, false)
|
||||
visible: false
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
maskSource: mask
|
||||
maskEnabled: true
|
||||
maskInverted: true
|
||||
maskThresholdMin: 0.5
|
||||
maskSpreadAtMin: 1
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
|
|
@ -34,14 +41,4 @@ Item {
|
|||
radius: Config.border.rounding
|
||||
}
|
||||
}
|
||||
|
||||
MultiEffect {
|
||||
anchors.fill: parent
|
||||
maskEnabled: true
|
||||
maskInverted: true
|
||||
maskSource: mask
|
||||
source: rect
|
||||
maskThresholdMin: 0.5
|
||||
maskSpreadAtMin: 1
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,10 +86,13 @@ Variants {
|
|||
}
|
||||
|
||||
Item {
|
||||
id: background
|
||||
|
||||
anchors.fill: parent
|
||||
visible: false
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
shadowEnabled: true
|
||||
blurMax: 15
|
||||
shadowColor: Qt.alpha(Colours.palette.m3shadow, 0.7)
|
||||
}
|
||||
|
||||
Border {
|
||||
bar: bar
|
||||
|
|
@ -101,14 +104,6 @@ Variants {
|
|||
}
|
||||
}
|
||||
|
||||
MultiEffect {
|
||||
anchors.fill: source
|
||||
source: background
|
||||
shadowEnabled: true
|
||||
blurMax: 15
|
||||
shadowColor: Qt.alpha(Colours.palette.m3shadow, 0.7)
|
||||
}
|
||||
|
||||
PersistentProperties {
|
||||
id: visibilities
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import "root:/widgets"
|
|||
import "root:/services"
|
||||
import "root:/config"
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
|
||||
|
|
@ -32,34 +33,10 @@ StyledRect {
|
|||
}
|
||||
}
|
||||
|
||||
CachingImage {
|
||||
id: image
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: Appearance.padding.large
|
||||
|
||||
visible: false
|
||||
path: root.modelData.path
|
||||
smooth: !root.PathView.view.moving
|
||||
|
||||
width: Config.launcher.sizes.wallpaperWidth
|
||||
height: width / 16 * 9
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: mask
|
||||
|
||||
layer.enabled: true
|
||||
layer.smooth: true
|
||||
visible: false
|
||||
anchors.fill: image
|
||||
radius: Appearance.rounding.normal
|
||||
}
|
||||
|
||||
RectangularShadow {
|
||||
opacity: root.PathView.isCurrentItem ? 0.7 : 0
|
||||
anchors.fill: mask
|
||||
radius: mask.radius
|
||||
anchors.fill: image
|
||||
radius: image.radius
|
||||
color: Colours.palette.m3shadow
|
||||
blur: 10
|
||||
spread: 3
|
||||
|
|
@ -69,13 +46,23 @@ StyledRect {
|
|||
}
|
||||
}
|
||||
|
||||
MultiEffect {
|
||||
anchors.fill: image
|
||||
source: image
|
||||
maskEnabled: true
|
||||
maskSource: mask
|
||||
maskSpreadAtMin: 1
|
||||
maskThresholdMin: 0.5
|
||||
ClippingRectangle {
|
||||
id: image
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: Appearance.padding.large
|
||||
color: "transparent"
|
||||
radius: Appearance.rounding.normal
|
||||
|
||||
implicitWidth: Config.launcher.sizes.wallpaperWidth
|
||||
implicitHeight: implicitWidth / 16 * 9
|
||||
|
||||
CachingImage {
|
||||
path: root.modelData.path
|
||||
smooth: !root.PathView.view.moving
|
||||
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/widgets"
|
||||
import "root:/services"
|
||||
import "root:/config"
|
||||
|
|
@ -36,7 +38,15 @@ Item {
|
|||
|
||||
anchors.fill: parent
|
||||
color: Colours.alpha(Colours.palette.m3surface, false)
|
||||
visible: false
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
maskEnabled: true
|
||||
maskInverted: true
|
||||
maskSource: mask
|
||||
maskThresholdMin: 0.5
|
||||
maskSpreadAtMin: 1
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
|
|
@ -59,16 +69,6 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
MultiEffect {
|
||||
anchors.fill: parent
|
||||
source: base
|
||||
maskEnabled: true
|
||||
maskInverted: true
|
||||
maskSource: mask
|
||||
maskThresholdMin: 0.5
|
||||
maskSpreadAtMin: 1
|
||||
}
|
||||
|
||||
Shape {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Math.floor(innerMask.anchors.margins)
|
||||
|
|
|
|||
|
|
@ -40,30 +40,25 @@ WlSessionLockSurface {
|
|||
}
|
||||
|
||||
ScreencopyView {
|
||||
id: screencopy
|
||||
|
||||
anchors.fill: parent
|
||||
captureSource: root.screen
|
||||
visible: false
|
||||
}
|
||||
|
||||
MultiEffect {
|
||||
id: background
|
||||
|
||||
anchors.fill: parent
|
||||
captureSource: root.screen
|
||||
|
||||
source: screencopy
|
||||
autoPaddingEnabled: false
|
||||
blurEnabled: true
|
||||
blur: root.locked ? 1 : 0
|
||||
blurMax: 64
|
||||
blurMultiplier: 1
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
autoPaddingEnabled: false
|
||||
blurEnabled: true
|
||||
blur: root.locked ? 1 : 0
|
||||
blurMax: 64
|
||||
blurMultiplier: 1
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {}
|
||||
Behavior on blur {
|
||||
Anim {}
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on blur {
|
||||
Behavior on opacity {
|
||||
Anim {}
|
||||
}
|
||||
}
|
||||
|
|
@ -79,15 +74,13 @@ WlSessionLockSurface {
|
|||
statusHeight: status.item?.nonAnimHeight ?? 0
|
||||
isNormal: root.screen.width > Config.lock.sizes.smallScreenWidth
|
||||
isLarge: root.screen.width > Config.lock.sizes.largeScreenWidth
|
||||
visible: false
|
||||
}
|
||||
|
||||
MultiEffect {
|
||||
anchors.fill: source
|
||||
source: backgrounds
|
||||
shadowEnabled: true
|
||||
blurMax: 15
|
||||
shadowColor: Qt.alpha(Colours.palette.m3shadow, 0.7)
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
shadowEnabled: true
|
||||
blurMax: 15
|
||||
shadowColor: Qt.alpha(Colours.palette.m3shadow, 0.7)
|
||||
}
|
||||
}
|
||||
|
||||
Clock {
|
||||
|
|
|
|||
|
|
@ -123,26 +123,19 @@ StyledRect {
|
|||
asynchronous: true
|
||||
|
||||
anchors.centerIn: parent
|
||||
visible: !root.modelData.appIcon.endsWith("symbolic")
|
||||
|
||||
width: Math.round(parent.width * 0.6)
|
||||
height: Math.round(parent.width * 0.6)
|
||||
|
||||
sourceComponent: IconImage {
|
||||
implicitSize: Math.round(parent.width * 0.6)
|
||||
anchors.fill: parent
|
||||
source: Quickshell.iconPath(root.modelData.appIcon)
|
||||
asynchronous: true
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: root.modelData.appIcon.endsWith("symbolic")
|
||||
asynchronous: true
|
||||
anchors.fill: icon
|
||||
|
||||
sourceComponent: Colouriser {
|
||||
source: icon
|
||||
colorizationColor: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : root.modelData.urgency === NotificationUrgency.Low ? Colours.palette.m3onSurface : Colours.palette.m3onTertiaryContainer
|
||||
layer.enabled: root.modelData.appIcon.endsWith("symbolic")
|
||||
layer.effect: Colouriser {
|
||||
colorizationColor: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : root.modelData.urgency === NotificationUrgency.Low ? Colours.palette.m3onSurface : Colours.palette.m3onTertiaryContainer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -151,26 +151,19 @@ StyledRect {
|
|||
asynchronous: true
|
||||
|
||||
anchors.centerIn: parent
|
||||
visible: !root.modelData.appIcon.endsWith("symbolic")
|
||||
|
||||
width: Math.round(parent.width * 0.6)
|
||||
height: Math.round(parent.width * 0.6)
|
||||
|
||||
sourceComponent: IconImage {
|
||||
implicitSize: Math.round(parent.width * 0.6)
|
||||
anchors.fill: parent
|
||||
source: Quickshell.iconPath(root.modelData.appIcon)
|
||||
asynchronous: true
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: root.modelData.appIcon.endsWith("symbolic")
|
||||
asynchronous: true
|
||||
anchors.fill: icon
|
||||
|
||||
sourceComponent: Colouriser {
|
||||
source: icon
|
||||
colorizationColor: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : root.modelData.urgency === NotificationUrgency.Low ? Colours.palette.m3onSurface : Colours.palette.m3onTertiaryContainer
|
||||
layer.enabled: root.modelData.appIcon.endsWith("symbolic")
|
||||
layer.effect: Colouriser {
|
||||
colorizationColor: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : root.modelData.urgency === NotificationUrgency.Low ? Colours.palette.m3onSurface : Colours.palette.m3onTertiaryContainer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue