remove layer usage to reduce vram consumption
This commit is contained in:
+21
-42
@@ -52,7 +52,7 @@ CustomWindow {
|
||||
property var root: Quickshell.shellDir
|
||||
readonly property ScreenState screenState: ShellState.forScreen(screen)
|
||||
readonly property real sdfBorderOffset: 2 * fsTransitionProg
|
||||
readonly property real shadowOpacity: 0.7 * (1 - (bar.isHovered ? 0 : fsTransitionProg))
|
||||
readonly property real shadowOpacity: 0.5 * (1 - (bar.isHovered ? 0 : fsTransitionProg))
|
||||
property color surfaceColor: Colors.tPalette.m3surface
|
||||
|
||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||
@@ -145,7 +145,6 @@ CustomWindow {
|
||||
HyprlandFocusGrab {
|
||||
id: focusGrab
|
||||
|
||||
windows: [root]
|
||||
active: {
|
||||
const s = root.screenState;
|
||||
const c = Config;
|
||||
@@ -162,6 +161,7 @@ CustomWindow {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
windows: [root]
|
||||
|
||||
onCleared: {
|
||||
root.screenState.launcher = false;
|
||||
@@ -187,23 +187,19 @@ CustomWindow {
|
||||
id: surface
|
||||
|
||||
anchors.fill: parent
|
||||
layer.enabled: true
|
||||
opacity: root.surfaceColor.a
|
||||
|
||||
layer.effect: MultiEffect {
|
||||
blurMax: 32
|
||||
shadowColor: Qt.alpha(Colors.palette.m3shadow, Math.max(0, root.shadowOpacity))
|
||||
shadowEnabled: true
|
||||
}
|
||||
|
||||
BlobGroup {
|
||||
BlobGroup2 {
|
||||
id: blobGroup
|
||||
|
||||
anchors.fill: parent
|
||||
color: root.surfaceColor
|
||||
shadowColor: Qt.alpha(Colors.palette.m3shadow, Math.max(0, root.shadowOpacity))
|
||||
shadowRadius: 18
|
||||
smoothing: Config.bar.smoothing
|
||||
}
|
||||
|
||||
BlobInvertedRect {
|
||||
BlobInvertedRect2 {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -50
|
||||
borderBottom: geometry.insetBottom(root.borderThickness) - anchors.margins - root.sdfBorderOffset
|
||||
@@ -299,13 +295,15 @@ CustomWindow {
|
||||
PanelBg {
|
||||
id: resourcesBg
|
||||
|
||||
property real extraExtent: 0.2
|
||||
|
||||
deformAmount: 0.05
|
||||
implicitHeight: panels.resources.height
|
||||
implicitWidth: panels.resources.width
|
||||
implicitHeight: panels.resources.height * (1 + extraExtent)
|
||||
implicitWidth: panels.resources.width * (1 + extraExtent)
|
||||
panel: panels.resourcesWrapper
|
||||
radius: Tokens.rounding.largeIncreased + Tokens.padding.small
|
||||
x: panels.resourcesWrapper.x + panels.resources.x + geometry.insetLeft(root.borderThickness)
|
||||
y: panels.resourcesWrapper.y + panels.resources.y + geometry.insetTop(root.borderThickness)
|
||||
x: panels.resourcesWrapper.x + panels.resources.x + geometry.insetLeft(root.borderThickness) - panels.resources.width * extraExtent
|
||||
y: panels.resourcesWrapper.y + panels.resources.y + geometry.insetTop(root.borderThickness) - panels.resources.height * extraExtent
|
||||
}
|
||||
|
||||
PanelBg {
|
||||
@@ -335,9 +333,15 @@ CustomWindow {
|
||||
PanelBg {
|
||||
id: clipboardBg
|
||||
|
||||
property real extraExtent: 0.2
|
||||
|
||||
deformAmount: 0.03
|
||||
implicitHeight: panels.clipboard.height * (1 + extraExtent)
|
||||
implicitWidth: panels.clipboard.width * (1 + extraExtent)
|
||||
panel: panels.clipboard
|
||||
radius: 29
|
||||
x: panels.clipboard.x + geometry.insetLeft(root.borderThickness) - panels.clipboard.width * extraExtent
|
||||
y: panels.clipboard.y + geometry.insetTop(root.borderThickness)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,34 +349,8 @@ CustomWindow {
|
||||
id: drawing
|
||||
|
||||
anchors.fill: parent
|
||||
layer.enabled: true
|
||||
screenState: root.screenState
|
||||
z: 2
|
||||
|
||||
layer.effect: MultiEffect {
|
||||
maskEnabled: true
|
||||
maskInverted: true
|
||||
maskSource: maskSource
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: maskSource
|
||||
|
||||
anchors.fill: parent
|
||||
layer.enabled: true
|
||||
visible: false
|
||||
|
||||
CustomRect {
|
||||
readonly property int extraWidth: radius
|
||||
|
||||
color: "white"
|
||||
implicitHeight: panels.drawing.height
|
||||
implicitWidth: panels.drawing.width + extraWidth
|
||||
radius: drawingBg.radius
|
||||
x: -extraWidth + root.borderThickness + panels.drawing.x
|
||||
y: panels.drawing.y + bar.implicitHeight
|
||||
}
|
||||
}
|
||||
|
||||
Interactions2 {
|
||||
@@ -452,10 +430,11 @@ CustomWindow {
|
||||
}
|
||||
}
|
||||
|
||||
component PanelBg: BlobRect {
|
||||
component PanelBg: BlobRect2 {
|
||||
property real deformAmount: 0.15
|
||||
required property Item panel
|
||||
|
||||
damping: 28.3
|
||||
deformScale: (deformAmount * Config.appearance.deform.scale) / 10000
|
||||
group: blobGroup
|
||||
implicitHeight: panel.height
|
||||
|
||||
Reference in New Issue
Block a user