From 26c2315b66875bccd953b3f75a8b0eb1a99875e7 Mon Sep 17 00:00:00 2001 From: zach Date: Wed, 22 Apr 2026 13:26:27 +0200 Subject: [PATCH 1/5] dashboard crash fix --- Modules/Dashboard/Dash/Media.qml | 96 ++++++++++++++++---------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/Modules/Dashboard/Dash/Media.qml b/Modules/Dashboard/Dash/Media.qml index 4b47b81..43e207a 100644 --- a/Modules/Dashboard/Dash/Media.qml +++ b/Modules/Dashboard/Dash/Media.qml @@ -38,55 +38,55 @@ Item { onTriggered: Players.active?.positionChanged() } - ServiceRef { - service: Audio.cava - } + // ServiceRef { + // service: Audio.cava + // } - Shape { - id: visualizer - - readonly property real barW: Math.max(0, (width - gap * (bars - 1)) / bars) - readonly property int bars: Config.services.visualizerBars - property color color: DynamicColors.palette.m3primary - readonly property real gap: Appearance.spacing.small - - anchors.fill: layout - asynchronous: true - data: visualizerBars.instances - preferredRendererType: Shape.CurveRenderer - } - - Variants { - id: visualizerBars - - model: Array.from({ - length: Config.services.visualizerBars - }, (_, i) => i) - - ShapePath { - id: visualizerBar - - readonly property real magnitude: value * Config.dashboard.sizes.mediaVisualiserSize - required property int modelData - readonly property real value: Math.max(1e-3, Audio.cava.values[modelData]) - - capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap - startX: (visualizer.barW / 2) + modelData * (visualizer.barW + visualizer.gap) - startY: layout.y + layout.height - strokeColor: visualizer.color - strokeWidth: visualizer.barW - - Behavior on strokeColor { - CAnim { - } - } - - PathLine { - relativeX: 0 - relativeY: -visualizerBar.magnitude - } - } - } + // Shape { + // id: visualizer + // + // readonly property real barW: Math.max(0, (width - gap * (bars - 1)) / bars) + // readonly property int bars: Config.services.visualizerBars + // property color color: DynamicColors.palette.m3primary + // readonly property real gap: Appearance.spacing.small + // + // anchors.fill: layout + // asynchronous: true + // data: visualizerBars.instances + // preferredRendererType: Shape.CurveRenderer + // } + // + // Variants { + // id: visualizerBars + // + // model: Array.from({ + // length: Config.services.visualizerBars + // }, (_, i) => i) + // + // ShapePath { + // id: visualizerBar + // + // readonly property real magnitude: value * Config.dashboard.sizes.mediaVisualiserSize + // required property int modelData + // readonly property real value: Math.max(1e-3, Audio.cava.values[modelData]) + // + // capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap + // startX: (visualizer.barW / 2) + modelData * (visualizer.barW + visualizer.gap) + // startY: layout.y + layout.height + // strokeColor: visualizer.color + // strokeWidth: visualizer.barW + // + // Behavior on strokeColor { + // CAnim { + // } + // } + // + // PathLine { + // relativeX: 0 + // relativeY: -visualizerBar.magnitude + // } + // } + // } Shape { preferredRendererType: Shape.CurveRenderer From 2b83c7784cf153cacff8d5688b6ab073037056d4 Mon Sep 17 00:00:00 2001 From: zach Date: Wed, 22 Apr 2026 14:41:10 +0200 Subject: [PATCH 2/5] test blob performance? --- Plugins/ZShell/Blobs/blobrect.cpp | 11 ++++++----- Plugins/ZShell/Blobs/blobshape.cpp | 13 +++++-------- Plugins/ZShell/Blobs/blobshape.hpp | 2 -- shell.qml | 1 + 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Plugins/ZShell/Blobs/blobrect.cpp b/Plugins/ZShell/Blobs/blobrect.cpp index dc03432..ea027a9 100644 --- a/Plugins/ZShell/Blobs/blobrect.cpp +++ b/Plugins/ZShell/Blobs/blobrect.cpp @@ -158,11 +158,12 @@ void BlobRect::setBottomRightRadius(qreal r) { } void BlobRect::cornerRadii(float out[4]) const { - const auto base = static_cast(m_radius); - out[0] = m_topRightRadius >= 0 ? static_cast(m_topRightRadius) : base; - out[1] = m_bottomRightRadius >= 0 ? static_cast(m_bottomRightRadius) : base; - out[2] = m_bottomLeftRadius >= 0 ? static_cast(m_bottomLeftRadius) : base; - out[3] = m_topLeftRadius >= 0 ? static_cast(m_topLeftRadius) : base; + const auto maxR = static_cast(std::min(width(), height())) * 0.5f; + const auto base = std::min(static_cast(m_radius), maxR); + out[0] = std::min(m_topRightRadius >= 0 ? static_cast(m_topRightRadius) : base, maxR); + out[1] = std::min(m_bottomRightRadius >= 0 ? static_cast(m_bottomRightRadius) : base, maxR); + out[2] = std::min(m_bottomLeftRadius >= 0 ? static_cast(m_bottomLeftRadius) : base, maxR); + out[3] = std::min(m_topLeftRadius >= 0 ? static_cast(m_topLeftRadius) : base, maxR); } bool BlobRect::isExcluded(const BlobShape* other) const { diff --git a/Plugins/ZShell/Blobs/blobshape.cpp b/Plugins/ZShell/Blobs/blobshape.cpp index d284a5e..ce05808 100644 --- a/Plugins/ZShell/Blobs/blobshape.cpp +++ b/Plugins/ZShell/Blobs/blobshape.cpp @@ -72,15 +72,11 @@ void BlobShape::geometryChange(const QRectF& newGeometry, const QRectF& oldGeome // Accumulate sub-pixel drift so slow movements don't desync the shader m_pendingDx += static_cast(newGeometry.x() - oldGeometry.x()); m_pendingDy += static_cast(newGeometry.y() - oldGeometry.y()); - m_pendingDw += static_cast(newGeometry.width() - oldGeometry.width()); - m_pendingDh += static_cast(newGeometry.height() - oldGeometry.height()); - - if (std::abs(m_pendingDx) > 0.5f || std::abs(m_pendingDy) > 0.5f || - std::abs(m_pendingDw) > 0.5f || std::abs(m_pendingDh) > 0.5f) { + const auto dw = std::abs(newGeometry.width() - oldGeometry.width()); + const auto dh = std::abs(newGeometry.height() - oldGeometry.height()); + if (std::abs(m_pendingDx) > 0.5f || std::abs(m_pendingDy) > 0.5f || dw > 0.5 || dh > 0.5) { m_pendingDx = 0; m_pendingDy = 0; - m_pendingDw = 0; - m_pendingDh = 0; m_group->markShapeDirty(this); } } @@ -100,7 +96,8 @@ void BlobShape::updateCenteredDeformMatrix() { } void BlobShape::cornerRadii(float out[4]) const { - const auto r = static_cast(m_radius); + const auto maxR = static_cast(std::min(width(), height())) * 0.5f; + const auto r = std::min(static_cast(m_radius), maxR); out[0] = r; out[1] = r; out[2] = r; diff --git a/Plugins/ZShell/Blobs/blobshape.hpp b/Plugins/ZShell/Blobs/blobshape.hpp index f130c23..aa1d018 100644 --- a/Plugins/ZShell/Blobs/blobshape.hpp +++ b/Plugins/ZShell/Blobs/blobshape.hpp @@ -85,8 +85,6 @@ QVector m_cachedRects; int m_cachedMyIndex = -2; float m_pendingDx = 0; float m_pendingDy = 0; -float m_pendingDw = 0; -float m_pendingDh = 0; bool m_cachedHasInverted = false; float m_cachedInvertedRadius = 0; float m_cachedInvertedOuter[4] = {}; diff --git a/shell.qml b/shell.qml index 9bf3bc9..6aa0bb2 100644 --- a/shell.qml +++ b/shell.qml @@ -1,6 +1,7 @@ //@ pragma UseQApplication //@ pragma Env QSG_RENDER_LOOP=threaded // @ pragma Env QSG_RHI_BACKEND=vulkan +//@ pragma Env QSG_NO_VSYNC=1 //@ pragma Env QSG_USE_SIMPLE_ANIMATION_DRIVER=0 //@ pragma Env QS_NO_RELOAD_POPUP=1 //@ pragma Env QT_SCALE_FACTOR_ROUNDING_POLICY=Round From 47b964d9cece97763236dbba9fc26e9d860158f5 Mon Sep 17 00:00:00 2001 From: zach Date: Wed, 22 Apr 2026 15:32:52 +0200 Subject: [PATCH 3/5] make dashboard unload on close --- Drawers/Windows.qml | 60 +++++++++++++++++------------------ Modules/Dashboard/Wrapper.qml | 3 +- Modules/Resource.qml | 8 ++--- Modules/Time.qml | 2 +- shell.qml | 3 +- 5 files changed, 37 insertions(+), 39 deletions(-) diff --git a/Drawers/Windows.qml b/Drawers/Windows.qml index 2a5430b..34bfcb7 100644 --- a/Drawers/Windows.qml +++ b/Drawers/Windows.qml @@ -321,36 +321,36 @@ Variants { screen: scope.modelData visibilities: visibilities - dashboard.transform: Matrix4x4 { - matrix: dashBg.deformMatrix - } - dock.transform: Matrix4x4 { - matrix: dockBg.deformMatrix - } - launcher.transform: Matrix4x4 { - matrix: launcherBg.deformMatrix - } - notifications.transform: Matrix4x4 { - matrix: notifsBg.deformMatrix - } - osd.transform: Matrix4x4 { - matrix: osdBg.deformMatrix - } - popouts.transform: Matrix4x4 { - matrix: popoutBg.deformMatrix - } - resources.transform: Matrix4x4 { - matrix: resourcesBg.deformMatrix - } - settings.transform: Matrix4x4 { - matrix: settingsBg.deformMatrix - } - sidebar.transform: Matrix4x4 { - matrix: sidebarBg.deformMatrix - } - utilities.transform: Matrix4x4 { - matrix: utilsBg.deformMatrix - } + // dashboard.transform: Matrix4x4 { + // matrix: dashBg.deformMatrix + // } + // dock.transform: Matrix4x4 { + // matrix: dockBg.deformMatrix + // } + // launcher.transform: Matrix4x4 { + // matrix: launcherBg.deformMatrix + // } + // notifications.transform: Matrix4x4 { + // matrix: notifsBg.deformMatrix + // } + // osd.transform: Matrix4x4 { + // matrix: osdBg.deformMatrix + // } + // popouts.transform: Matrix4x4 { + // matrix: popoutBg.deformMatrix + // } + // resources.transform: Matrix4x4 { + // matrix: resourcesBg.deformMatrix + // } + // settings.transform: Matrix4x4 { + // matrix: settingsBg.deformMatrix + // } + // sidebar.transform: Matrix4x4 { + // matrix: sidebarBg.deformMatrix + // } + // utilities.transform: Matrix4x4 { + // matrix: utilsBg.deformMatrix + // } } BarLoader { diff --git a/Modules/Dashboard/Wrapper.qml b/Modules/Dashboard/Wrapper.qml index ef4e998..0e2fcf4 100644 --- a/Modules/Dashboard/Wrapper.qml +++ b/Modules/Dashboard/Wrapper.qml @@ -22,8 +22,7 @@ Item { implicitHeight: content.implicitHeight implicitWidth: content.implicitWidth || 854 // Hard coded fallback for first open opacity: 1 - offsetScale - - // visible: offsetScale < 1 + visible: offsetScale < 1 Loader { id: content diff --git a/Modules/Resource.qml b/Modules/Resource.qml index e741ac5..32a6b46 100644 --- a/Modules/Resource.qml +++ b/Modules/Resource.qml @@ -60,10 +60,10 @@ RowLayout { color: root.mainColor implicitHeight: Math.ceil(root.percentage * parent.height) - Behavior on implicitHeight { - Anim { - } - } + // Behavior on implicitHeight { + // Anim { + // } + // } } } } diff --git a/Modules/Time.qml b/Modules/Time.qml index 542f13f..a0ef30c 100644 --- a/Modules/Time.qml +++ b/Modules/Time.qml @@ -7,7 +7,7 @@ Singleton { id: root readonly property date date: clock.date - readonly property string dateStr: format("ddd d MMM - hh:mm:ss") + readonly property string dateStr: format("ddd d MMM - hh:mm") property alias enabled: clock.enabled readonly property string hourStr: timeComponents[0] ?? "" readonly property int hours: clock.hours diff --git a/shell.qml b/shell.qml index 6aa0bb2..1a15c5c 100644 --- a/shell.qml +++ b/shell.qml @@ -1,8 +1,7 @@ //@ pragma UseQApplication //@ pragma Env QSG_RENDER_LOOP=threaded -// @ pragma Env QSG_RHI_BACKEND=vulkan +//@ pragma Env QSG_RHI_BACKEND=vulkan //@ pragma Env QSG_NO_VSYNC=1 -//@ pragma Env QSG_USE_SIMPLE_ANIMATION_DRIVER=0 //@ pragma Env QS_NO_RELOAD_POPUP=1 //@ pragma Env QT_SCALE_FACTOR_ROUNDING_POLICY=Round //@ pragma DropExpensiveFonts From cd86fc53a3004c307e008902003dd57e9f612032 Mon Sep 17 00:00:00 2001 From: zach Date: Wed, 22 Apr 2026 15:38:19 +0200 Subject: [PATCH 4/5] restore seconds in time --- Modules/Time.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Time.qml b/Modules/Time.qml index a0ef30c..542f13f 100644 --- a/Modules/Time.qml +++ b/Modules/Time.qml @@ -7,7 +7,7 @@ Singleton { id: root readonly property date date: clock.date - readonly property string dateStr: format("ddd d MMM - hh:mm") + readonly property string dateStr: format("ddd d MMM - hh:mm:ss") property alias enabled: clock.enabled readonly property string hourStr: timeComponents[0] ?? "" readonly property int hours: clock.hours From 09d61dc70dd3617c5b54f4c27d173c98dbcbae47 Mon Sep 17 00:00:00 2001 From: zach Date: Wed, 22 Apr 2026 15:46:53 +0200 Subject: [PATCH 5/5] restore cava in dashboard --- Drawers/Windows.qml | 60 ++++++++++---------- Modules/Dashboard/Dash/Media.qml | 96 ++++++++++++++++---------------- shell.qml | 2 +- 3 files changed, 79 insertions(+), 79 deletions(-) diff --git a/Drawers/Windows.qml b/Drawers/Windows.qml index 34bfcb7..2a5430b 100644 --- a/Drawers/Windows.qml +++ b/Drawers/Windows.qml @@ -321,36 +321,36 @@ Variants { screen: scope.modelData visibilities: visibilities - // dashboard.transform: Matrix4x4 { - // matrix: dashBg.deformMatrix - // } - // dock.transform: Matrix4x4 { - // matrix: dockBg.deformMatrix - // } - // launcher.transform: Matrix4x4 { - // matrix: launcherBg.deformMatrix - // } - // notifications.transform: Matrix4x4 { - // matrix: notifsBg.deformMatrix - // } - // osd.transform: Matrix4x4 { - // matrix: osdBg.deformMatrix - // } - // popouts.transform: Matrix4x4 { - // matrix: popoutBg.deformMatrix - // } - // resources.transform: Matrix4x4 { - // matrix: resourcesBg.deformMatrix - // } - // settings.transform: Matrix4x4 { - // matrix: settingsBg.deformMatrix - // } - // sidebar.transform: Matrix4x4 { - // matrix: sidebarBg.deformMatrix - // } - // utilities.transform: Matrix4x4 { - // matrix: utilsBg.deformMatrix - // } + dashboard.transform: Matrix4x4 { + matrix: dashBg.deformMatrix + } + dock.transform: Matrix4x4 { + matrix: dockBg.deformMatrix + } + launcher.transform: Matrix4x4 { + matrix: launcherBg.deformMatrix + } + notifications.transform: Matrix4x4 { + matrix: notifsBg.deformMatrix + } + osd.transform: Matrix4x4 { + matrix: osdBg.deformMatrix + } + popouts.transform: Matrix4x4 { + matrix: popoutBg.deformMatrix + } + resources.transform: Matrix4x4 { + matrix: resourcesBg.deformMatrix + } + settings.transform: Matrix4x4 { + matrix: settingsBg.deformMatrix + } + sidebar.transform: Matrix4x4 { + matrix: sidebarBg.deformMatrix + } + utilities.transform: Matrix4x4 { + matrix: utilsBg.deformMatrix + } } BarLoader { diff --git a/Modules/Dashboard/Dash/Media.qml b/Modules/Dashboard/Dash/Media.qml index 43e207a..4b47b81 100644 --- a/Modules/Dashboard/Dash/Media.qml +++ b/Modules/Dashboard/Dash/Media.qml @@ -38,55 +38,55 @@ Item { onTriggered: Players.active?.positionChanged() } - // ServiceRef { - // service: Audio.cava - // } + ServiceRef { + service: Audio.cava + } - // Shape { - // id: visualizer - // - // readonly property real barW: Math.max(0, (width - gap * (bars - 1)) / bars) - // readonly property int bars: Config.services.visualizerBars - // property color color: DynamicColors.palette.m3primary - // readonly property real gap: Appearance.spacing.small - // - // anchors.fill: layout - // asynchronous: true - // data: visualizerBars.instances - // preferredRendererType: Shape.CurveRenderer - // } - // - // Variants { - // id: visualizerBars - // - // model: Array.from({ - // length: Config.services.visualizerBars - // }, (_, i) => i) - // - // ShapePath { - // id: visualizerBar - // - // readonly property real magnitude: value * Config.dashboard.sizes.mediaVisualiserSize - // required property int modelData - // readonly property real value: Math.max(1e-3, Audio.cava.values[modelData]) - // - // capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap - // startX: (visualizer.barW / 2) + modelData * (visualizer.barW + visualizer.gap) - // startY: layout.y + layout.height - // strokeColor: visualizer.color - // strokeWidth: visualizer.barW - // - // Behavior on strokeColor { - // CAnim { - // } - // } - // - // PathLine { - // relativeX: 0 - // relativeY: -visualizerBar.magnitude - // } - // } - // } + Shape { + id: visualizer + + readonly property real barW: Math.max(0, (width - gap * (bars - 1)) / bars) + readonly property int bars: Config.services.visualizerBars + property color color: DynamicColors.palette.m3primary + readonly property real gap: Appearance.spacing.small + + anchors.fill: layout + asynchronous: true + data: visualizerBars.instances + preferredRendererType: Shape.CurveRenderer + } + + Variants { + id: visualizerBars + + model: Array.from({ + length: Config.services.visualizerBars + }, (_, i) => i) + + ShapePath { + id: visualizerBar + + readonly property real magnitude: value * Config.dashboard.sizes.mediaVisualiserSize + required property int modelData + readonly property real value: Math.max(1e-3, Audio.cava.values[modelData]) + + capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap + startX: (visualizer.barW / 2) + modelData * (visualizer.barW + visualizer.gap) + startY: layout.y + layout.height + strokeColor: visualizer.color + strokeWidth: visualizer.barW + + Behavior on strokeColor { + CAnim { + } + } + + PathLine { + relativeX: 0 + relativeY: -visualizerBar.magnitude + } + } + } Shape { preferredRendererType: Shape.CurveRenderer diff --git a/shell.qml b/shell.qml index 1a15c5c..892321c 100644 --- a/shell.qml +++ b/shell.qml @@ -1,6 +1,6 @@ //@ pragma UseQApplication //@ pragma Env QSG_RENDER_LOOP=threaded -//@ pragma Env QSG_RHI_BACKEND=vulkan +// @ pragma Env QSG_RHI_BACKEND=vulkan //@ pragma Env QSG_NO_VSYNC=1 //@ pragma Env QS_NO_RELOAD_POPUP=1 //@ pragma Env QT_SCALE_FACTOR_ROUNDING_POLICY=Round