needs some more work

This commit is contained in:
kossLAN 2025-06-10 13:52:54 -04:00
parent 8845996c8c
commit 41ad28610a
Signed by: kossLAN
SSH key fingerprint: SHA256:bdV0x+wdQHGJ6LgmstH3KV8OpWY+OOFmJcPcB0wQPV8
4 changed files with 146 additions and 81 deletions

134
shell.qml
View file

@ -4,8 +4,6 @@ import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Quickshell
import Quickshell.Widgets
import Qt5Compat.GraphicalEffects
ShellRoot {
FloatingWindow {
@ -39,91 +37,57 @@ ShellRoot {
anchors.fill: parent
}
ClippingRectangle {
id: glassContainer
color: "transparent"
radius: 20
anchors.centerIn: parent
GlassSurface {
source: backgroundContent
width: 400
height: 300
radius: 20
anchors.centerIn: parent
// Blur
ShaderEffectSource {
id: blurredBackground
anchors.fill: parent
sourceItem: backgroundContent
sourceRect: Qt.rect(glassContainer.x, glassContainer.y, glassContainer.width, glassContainer.height)
hideSource: false
live: true
}
// parameters
time: timeSlider.value
speed: speedSlider.value
strength: warpSlider.value
scale: scaleSlider.value
edgeReflectionStrength: edgeReflectionSlider.value
edgeReflectionWidth: edgeWidthSlider.value
}
GaussianBlur {
id: backgroundBlur
anchors.fill: parent
source: blurredBackground
radius: 4
samples: 4
// transparentBorder: true
}
RowLayout {
spacing: 40
// Liquid glass shader warp
ShaderEffect {
anchors.fill: parent
fragmentShader: "root:shaders/liquid-glass.frag.qsb"
Repeater {
model: ["1", "2", "3"]
delegate: GlassSurface {
id: surface
required property var modelData
source: backgroundContent
width: 100
height: 100
radius: 40
property real time: timeSlider.value
property real warpStrength: warpSlider.value
property real flowSpeed: speedSlider.value
property real scale: 3.0
property real edgeReflectionStrength: edgeReflectionSlider.value
property real edgeReflectionWidth: edgeWidthSlider.value
property real cornerRadius: 0.1
time: timeSlider.value
speed: speedSlider.value
strength: warpSlider.value
scale: scaleSlider.value
edgeReflectionStrength: edgeReflectionSlider.value
edgeReflectionWidth: edgeWidthSlider.value
property variant source: ShaderEffectSource {
sourceItem: backgroundBlur
hideSource: false
live: true
}
}
// Subtle glass overlay
Rectangle {
anchors.fill: parent
color: "transparent"
radius: 20
// Subtle inner glow
Rectangle {
anchors.fill: parent
anchors.margins: 1
radius: parent.radius - 1
color: "transparent"
border.width: 1
border.color: Qt.rgba(1, 1, 1, 0.05)
}
border.width: 1
border.color: Qt.rgba(1, 1, 1, 0.15)
Rectangle {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 1
height: parent.height * 0.3
radius: parent.radius - 1
gradient: Gradient {
GradientStop {
position: 0.0
color: Qt.rgba(1, 1, 1, 0.08)
}
GradientStop {
position: 1.0
color: Qt.rgba(1, 1, 1, 0.0)
}
Text {
text: surface.modelData
color: Qt.rgba(1, 1, 1, 0.2)
font.bold: true
font.pointSize: 16
anchors.centerIn: parent
}
}
}
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
bottomMargin: 25
}
}
}
@ -206,6 +170,22 @@ ShellRoot {
Layout.preferredHeight: 30
}
}
RowLayout {
Text {
text: "Scale:"
}
Slider {
id: scaleSlider
from: 0.0
to: 20.0
value: 3.0
Layout.fillWidth: true
Layout.preferredHeight: 30
}
}
}
}
}