From 81c6a17ba5b05064512cd72210561ae0e252fb32 Mon Sep 17 00:00:00 2001 From: Ly-sec Date: Fri, 5 Dec 2025 15:36:51 +0100 Subject: [PATCH 1/2] AudioVisualizer: respect bar location (fix #946) MediaMini: cava respect bar location NLinearSpectrum: use barPosition if needed --- Modules/Bar/Widgets/AudioVisualizer.qml | 1 + Modules/Bar/Widgets/MediaMini.qml | 1 + Widgets/AudioSpectrum/NLinearSpectrum.qml | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Modules/Bar/Widgets/AudioVisualizer.qml b/Modules/Bar/Widgets/AudioVisualizer.qml index 1fbefc235..516392727 100644 --- a/Modules/Bar/Widgets/AudioVisualizer.qml +++ b/Modules/Bar/Widgets/AudioVisualizer.qml @@ -171,6 +171,7 @@ Item { fillColor: root.fillColor showMinimumSignal: true vertical: root.isVerticalBar + barPosition: Settings.data.bar.position } } diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index 0b1a70788..d417f9839 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -392,6 +392,7 @@ Item { values: CavaService.values fillColor: Color.mPrimary opacity: 0.4 + barPosition: Settings.data.bar.position } } diff --git a/Widgets/AudioSpectrum/NLinearSpectrum.qml b/Widgets/AudioSpectrum/NLinearSpectrum.qml index 596f7d105..878dd8169 100644 --- a/Widgets/AudioSpectrum/NLinearSpectrum.qml +++ b/Widgets/AudioSpectrum/NLinearSpectrum.qml @@ -8,6 +8,7 @@ Item { property int strokeWidth: 0 property var values: [] property bool vertical: false + property string barPosition: "top" // "top", "bottom", "left", "right" // Minimum signal properties property bool showMinimumSignal: false @@ -40,7 +41,7 @@ Item { // Only update when value actually changes - reduces GPU load width: vertical ? root.width * amp : root.barSlotSize * 0.5 height: vertical ? root.barSlotSize * 0.5 : root.height * amp - x: vertical ? root.width - width : index * root.barSlotSize + (root.barSlotSize * 0.25) + x: vertical ? (root.barPosition === "left" ? 0 : root.width - width) : index * root.barSlotSize + (root.barSlotSize * 0.25) y: vertical ? index * root.barSlotSize + (root.barSlotSize * 0.25) : root.height - height // Disable updates when invisible to save GPU From 0130afd26bdf07769161db7cba5f57d9584a50fb Mon Sep 17 00:00:00 2001 From: Ly-sec Date: Fri, 5 Dec 2025 15:41:05 +0100 Subject: [PATCH 2/2] Notification: if bar is left/right, add proper offset ToastScreen: if bar is left/right, add proper offset --- Modules/Notification/Notification.qml | 4 ++-- Modules/Toast/ToastScreen.qml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index aa1c7ab02..fcf8af5fc 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -82,14 +82,14 @@ Variants { if (barPos !== "left") return 0; const floatMarginH = isFloating ? Settings.data.bar.marginHorizontal * Style.marginXL : 0; - return floatMarginH; + return Style.barHeight + floatMarginH; } readonly property int barOffsetRight: { if (barPos !== "right") return 0; const floatMarginH = isFloating ? Settings.data.bar.marginHorizontal * Style.marginXL : 0; - return floatMarginH; + return Style.barHeight + floatMarginH; } // Anchoring diff --git a/Modules/Toast/ToastScreen.qml b/Modules/Toast/ToastScreen.qml index d66d06ff0..1ab981b26 100644 --- a/Modules/Toast/ToastScreen.qml +++ b/Modules/Toast/ToastScreen.qml @@ -163,14 +163,14 @@ Item { if (barPos !== "left") return 0; const floatMarginH = isFloating ? Settings.data.bar.marginHorizontal * Style.marginXL : 0; - return floatMarginH; + return Style.barHeight + floatMarginH; } readonly property int barOffsetRight: { if (barPos !== "right") return 0; const floatMarginH = isFloating ? Settings.data.bar.marginHorizontal * Style.marginXL : 0; - return floatMarginH; + return Style.barHeight + floatMarginH; } // Anchoring