From aa30e90ec7535266617e94a35fd9a7fe29eb8236 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Fri, 31 Oct 2025 01:01:55 -0400 Subject: [PATCH] NPanel: use bar bg color when attached. --- Widgets/NPanel.qml | 20 +++++++++---------- ...ctangleCurved.qml => NShapedRectangle.qml} | 0 2 files changed, 10 insertions(+), 10 deletions(-) rename Widgets/{NRectangleCurved.qml => NShapedRectangle.qml} (100%) diff --git a/Widgets/NPanel.qml b/Widgets/NPanel.qml index feb32e96..63a4e5b4 100644 --- a/Widgets/NPanel.qml +++ b/Widgets/NPanel.qml @@ -223,10 +223,10 @@ Loader { } // The actual panel's content - NRectangleCurved { + NShapedRectangle { id: panelBackground - backgroundColor: panelBackgroundColor + backgroundColor: panelBackgroundColor ? Qt.alpha(panelBackgroundColor, Settings.data.bar.backgroundOpacity) : panelBackgroundColor topLeftRadius: Style.radiusL topRightRadius: Style.radiusL @@ -362,8 +362,8 @@ Loader { switch (barPosition) { case "top": return (Style.barHeight + (attachedToBar ? 0 : Style.marginS)) - + (Settings.data.bar.floating ? Settings.data.bar.marginVertical - * Style.marginXL : 0) + + (Settings.data.bar.floating ? Math.round(Settings.data.bar.marginVertical + * Style.marginXL) : 0) default: return attachedToBar ? 0 : Style.marginS } @@ -376,8 +376,8 @@ Loader { switch (barPosition) { case "bottom": return (Style.barHeight + (attachedToBar ? 0 : Style.marginS)) - + (Settings.data.bar.floating ? Settings.data.bar.marginVertical - * Style.marginXL : 0) + + (Settings.data.bar.floating ? Math.round(Settings.data.bar.marginVertical + * Style.marginXL) : 0) default: return attachedToBar ? 0 : Style.marginS } @@ -390,8 +390,8 @@ Loader { switch (barPosition) { case "left": return (Style.barHeight + (attachedToBar ? 0 : Style.marginS)) - + (Settings.data.bar.floating ? Settings.data.bar.marginHorizontal - * Style.marginXL : 0) + + (Settings.data.bar.floating ? Math.round(Settings.data.bar.marginHorizontal + * Style.marginXL) : 0) default: return attachedToBar ? 0 : Style.marginS } @@ -404,8 +404,8 @@ Loader { switch (barPosition) { case "right": return (Style.barHeight + (attachedToBar ? 0 : Style.marginS)) - + (Settings.data.bar.floating ? Settings.data.bar.marginHorizontal - * Style.marginXL : 0) + + (Settings.data.bar.floating ? Math.round(Settings.data.bar.marginHorizontal + * Style.marginXL) : 0) default: return attachedToBar ? 0 : Style.marginS } diff --git a/Widgets/NRectangleCurved.qml b/Widgets/NShapedRectangle.qml similarity index 100% rename from Widgets/NRectangleCurved.qml rename to Widgets/NShapedRectangle.qml