From 44a45b00cfea1b985c53ead69186c588f8eb9c62 Mon Sep 17 00:00:00 2001 From: bbedward Date: Sat, 14 Feb 2026 11:15:26 -0500 Subject: [PATCH] widgets: cleanup rectangles across popouts, modals, OSDs --- quickshell/Modals/Common/DankModal.qml | 7 +-- .../DankLauncherV2/DankLauncherV2Modal.qml | 6 +- .../Modules/AppDrawer/AppDrawerPopout.qml | 32 ---------- .../ControlCenter/ControlCenterPopout.qml | 5 -- .../Modules/DankBar/Popouts/BatteryPopout.qml | 34 ---------- .../DankBar/Popouts/DWLLayoutPopout.qml | 14 ----- .../Modules/DankBar/Popouts/VpnPopout.qml | 3 - .../Modules/DankDash/DankDashPopout.qml | 1 - quickshell/Modules/Dock/Dock.qml | 12 +++- .../Center/NotificationCenterPopout.qml | 3 - .../Notifications/Popup/NotificationPopup.qml | 63 ++----------------- quickshell/Modules/Plugins/PluginPopout.qml | 4 -- quickshell/Modules/SystemUpdatePopout.qml | 32 ---------- quickshell/Widgets/DankOSD.qml | 10 ++- quickshell/Widgets/DankPopout.qml | 5 +- quickshell/Widgets/DankRectangle.qml | 54 ---------------- 16 files changed, 31 insertions(+), 254 deletions(-) delete mode 100644 quickshell/Widgets/DankRectangle.qml diff --git a/quickshell/Modals/Common/DankModal.qml b/quickshell/Modals/Common/DankModal.qml index cce215b2..3c94d189 100644 --- a/quickshell/Modals/Common/DankModal.qml +++ b/quickshell/Modals/Common/DankModal.qml @@ -3,7 +3,6 @@ import Quickshell import Quickshell.Wayland import qs.Common import qs.Services -import qs.Widgets Item { id: root @@ -378,11 +377,11 @@ Item { } } - DankRectangle { + Rectangle { anchors.fill: parent color: root.backgroundColor - borderColor: root.borderColor - borderWidth: root.borderWidth + border.color: root.borderColor + border.width: root.borderWidth radius: root.cornerRadius } diff --git a/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml b/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml index 5414335a..75920ac8 100644 --- a/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml +++ b/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml @@ -357,11 +357,11 @@ Item { } } - DankRectangle { + Rectangle { anchors.fill: parent color: root.backgroundColor - borderColor: root.borderColor - borderWidth: root.borderWidth + border.color: root.borderColor + border.width: root.borderWidth radius: root.cornerRadius } diff --git a/quickshell/Modules/AppDrawer/AppDrawerPopout.qml b/quickshell/Modules/AppDrawer/AppDrawerPopout.qml index 6b6de743..16e9b0b0 100644 --- a/quickshell/Modules/AppDrawer/AppDrawerPopout.qml +++ b/quickshell/Modules/AppDrawer/AppDrawerPopout.qml @@ -54,9 +54,6 @@ DankPopout { property alias launcherContent: launcherContent color: "transparent" - radius: Theme.cornerRadius - antialiasing: true - smooth: true QtObject { id: modalAdapter @@ -68,35 +65,6 @@ DankPopout { } } - Repeater { - model: [ - { - "margin": -3, - "color": Qt.rgba(0, 0, 0, 0.05), - "z": -3 - }, - { - "margin": -2, - "color": Qt.rgba(0, 0, 0, 0.08), - "z": -2 - }, - { - "margin": 0, - "color": Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12), - "z": -1 - } - ] - Rectangle { - anchors.fill: parent - anchors.margins: modelData.margin - color: "transparent" - radius: parent.radius + Math.abs(modelData.margin) - border.color: modelData.color - border.width: 0 - z: modelData.z - } - } - FocusScope { anchors.fill: parent focus: true diff --git a/quickshell/Modules/ControlCenter/ControlCenterPopout.qml b/quickshell/Modules/ControlCenter/ControlCenterPopout.qml index 6bb5d83a..dd6b10ab 100644 --- a/quickshell/Modules/ControlCenter/ControlCenterPopout.qml +++ b/quickshell/Modules/ControlCenter/ControlCenterPopout.qml @@ -115,11 +115,6 @@ DankPopout { property alias bluetoothCodecSelector: bluetoothCodecSelector color: "transparent" - radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) - border.width: 0 - antialiasing: true - smooth: true Rectangle { anchors.fill: parent diff --git a/quickshell/Modules/DankBar/Popouts/BatteryPopout.qml b/quickshell/Modules/DankBar/Popouts/BatteryPopout.qml index 5f74c41a..8da438dd 100644 --- a/quickshell/Modules/DankBar/Popouts/BatteryPopout.qml +++ b/quickshell/Modules/DankBar/Popouts/BatteryPopout.qml @@ -48,11 +48,6 @@ DankPopout { implicitHeight: contentColumn.implicitHeight + Theme.spacingL * 2 color: "transparent" - radius: Theme.cornerRadius - border.color: Theme.outlineMedium - border.width: 0 - antialiasing: true - smooth: true focus: true Component.onCompleted: { if (root.shouldBeVisible) { @@ -78,35 +73,6 @@ DankPopout { target: root } - Rectangle { - anchors.fill: parent - anchors.margins: -3 - color: "transparent" - radius: parent.radius + 3 - border.color: Qt.rgba(0, 0, 0, 0.05) - border.width: 0 - z: -3 - } - - Rectangle { - anchors.fill: parent - anchors.margins: -2 - color: "transparent" - radius: parent.radius + 2 - border.color: Theme.shadowMedium - border.width: 0 - z: -2 - } - - Rectangle { - anchors.fill: parent - color: "transparent" - border.color: Theme.outlineStrong - border.width: 0 - radius: parent.radius - z: -1 - } - Column { id: contentColumn diff --git a/quickshell/Modules/DankBar/Popouts/DWLLayoutPopout.qml b/quickshell/Modules/DankBar/Popouts/DWLLayoutPopout.qml index a5cda6e7..9daed8d5 100644 --- a/quickshell/Modules/DankBar/Popouts/DWLLayoutPopout.qml +++ b/quickshell/Modules/DankBar/Popouts/DWLLayoutPopout.qml @@ -111,11 +111,6 @@ DankPopout { implicitHeight: contentColumn.implicitHeight + Theme.spacingL * 2 color: "transparent" - radius: Theme.cornerRadius - border.color: Theme.outlineMedium - border.width: 0 - antialiasing: true - smooth: true focus: true Component.onCompleted: { @@ -142,15 +137,6 @@ DankPopout { } } - Rectangle { - anchors.fill: parent - color: "transparent" - border.color: Theme.outlineStrong - border.width: 0 - radius: parent.radius - z: -1 - } - Column { id: contentColumn diff --git a/quickshell/Modules/DankBar/Popouts/VpnPopout.qml b/quickshell/Modules/DankBar/Popouts/VpnPopout.qml index fc315fc1..064f5782 100644 --- a/quickshell/Modules/DankBar/Popouts/VpnPopout.qml +++ b/quickshell/Modules/DankBar/Popouts/VpnPopout.qml @@ -37,9 +37,6 @@ DankPopout { implicitHeight: contentColumn.height + Theme.spacingL * 2 color: "transparent" - radius: Theme.cornerRadius - border.color: Theme.outlineMedium - border.width: 0 focus: true Keys.onPressed: event => { diff --git a/quickshell/Modules/DankDash/DankDashPopout.qml b/quickshell/Modules/DankDash/DankDashPopout.qml index feb82e34..03600971 100644 --- a/quickshell/Modules/DankDash/DankDashPopout.qml +++ b/quickshell/Modules/DankDash/DankDashPopout.qml @@ -170,7 +170,6 @@ DankPopout { implicitHeight: contentColumn.height + Theme.spacingM * 2 color: "transparent" - radius: Theme.cornerRadius focus: true Component.onCompleted: { diff --git a/quickshell/Modules/Dock/Dock.qml b/quickshell/Modules/Dock/Dock.qml index 6ca3ec0a..d30a9145 100644 --- a/quickshell/Modules/Dock/Dock.qml +++ b/quickshell/Modules/Dock/Dock.qml @@ -551,10 +551,18 @@ Variants { layer.enabled: true clip: false - DankRectangle { + Rectangle { anchors.fill: parent color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, backgroundTransparency) - overlayColor: Qt.rgba(Theme.surfaceTint.r, Theme.surfaceTint.g, Theme.surfaceTint.b, 0.04) + border.color: Theme.outlineMedium + border.width: 1 + radius: Theme.cornerRadius + } + + Rectangle { + anchors.fill: parent + color: Qt.rgba(Theme.surfaceTint.r, Theme.surfaceTint.g, Theme.surfaceTint.b, 0.04) + radius: Theme.cornerRadius } } diff --git a/quickshell/Modules/Notifications/Center/NotificationCenterPopout.qml b/quickshell/Modules/Notifications/Center/NotificationCenterPopout.qml index ed886fd2..3459211e 100644 --- a/quickshell/Modules/Notifications/Center/NotificationCenterPopout.qml +++ b/quickshell/Modules/Notifications/Center/NotificationCenterPopout.qml @@ -132,9 +132,6 @@ DankPopout { } color: "transparent" - radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) - border.width: 0 focus: true Component.onCompleted: { diff --git a/quickshell/Modules/Notifications/Popup/NotificationPopup.qml b/quickshell/Modules/Notifications/Popup/NotificationPopup.qml index 92cc9af3..5fac19cd 100644 --- a/quickshell/Modules/Notifications/Popup/NotificationPopup.qml +++ b/quickshell/Modules/Notifications/Popup/NotificationPopup.qml @@ -1,7 +1,6 @@ import QtQuick import QtQuick.Controls import QtQuick.Effects -import QtQuick.Shapes import Quickshell import Quickshell.Wayland import Quickshell.Services.Notifications @@ -268,65 +267,13 @@ PanelWindow { } } - Shape { + Rectangle { id: backgroundShape anchors.fill: parent - preferredRendererType: Shape.CurveRenderer - - readonly property real radius: Theme.cornerRadius - readonly property color fillColor: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) - readonly property color strokeColor: notificationData && notificationData.urgency === NotificationUrgency.Critical ? Theme.withAlpha(Theme.primary, 0.3) : Theme.withAlpha(Theme.outline, 0.08) - readonly property real strokeWidth: notificationData && notificationData.urgency === NotificationUrgency.Critical ? 2 : 0 - - ShapePath { - fillColor: backgroundShape.fillColor - strokeColor: backgroundShape.strokeColor - strokeWidth: backgroundShape.strokeWidth - - startX: backgroundShape.radius - startY: 0 - - PathLine { - x: backgroundShape.width - backgroundShape.radius - y: 0 - } - PathQuad { - x: backgroundShape.width - y: backgroundShape.radius - controlX: backgroundShape.width - controlY: 0 - } - PathLine { - x: backgroundShape.width - y: backgroundShape.height - backgroundShape.radius - } - PathQuad { - x: backgroundShape.width - backgroundShape.radius - y: backgroundShape.height - controlX: backgroundShape.width - controlY: backgroundShape.height - } - PathLine { - x: backgroundShape.radius - y: backgroundShape.height - } - PathQuad { - x: 0 - y: backgroundShape.height - backgroundShape.radius - controlX: 0 - controlY: backgroundShape.height - } - PathLine { - x: 0 - y: backgroundShape.radius - } - PathQuad { - x: backgroundShape.radius - y: 0 - controlX: 0 - controlY: 0 - } - } + radius: Theme.cornerRadius + color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) + border.color: notificationData && notificationData.urgency === NotificationUrgency.Critical ? Theme.withAlpha(Theme.primary, 0.3) : Theme.withAlpha(Theme.outline, 0.08) + border.width: notificationData && notificationData.urgency === NotificationUrgency.Critical ? 2 : 0 } Rectangle { diff --git a/quickshell/Modules/Plugins/PluginPopout.qml b/quickshell/Modules/Plugins/PluginPopout.qml index 62e3e0e2..acd24b98 100644 --- a/quickshell/Modules/Plugins/PluginPopout.qml +++ b/quickshell/Modules/Plugins/PluginPopout.qml @@ -25,10 +25,6 @@ DankPopout { implicitHeight: popoutColumn.implicitHeight + Theme.spacingL * 2 color: "transparent" - radius: Theme.cornerRadius - border.width: 0 - antialiasing: true - smooth: true focus: true Component.onCompleted: { diff --git a/quickshell/Modules/SystemUpdatePopout.qml b/quickshell/Modules/SystemUpdatePopout.qml index 2836a764..92d31078 100644 --- a/quickshell/Modules/SystemUpdatePopout.qml +++ b/quickshell/Modules/SystemUpdatePopout.qml @@ -37,38 +37,6 @@ DankPopout { id: updaterPanel color: "transparent" - radius: Theme.cornerRadius - antialiasing: true - smooth: true - - Repeater { - model: [ - { - "margin": -3, - "color": Qt.rgba(0, 0, 0, 0.05), - "z": -3 - }, - { - "margin": -2, - "color": Qt.rgba(0, 0, 0, 0.08), - "z": -2 - }, - { - "margin": 0, - "color": Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12), - "z": -1 - } - ] - Rectangle { - anchors.fill: parent - anchors.margins: modelData.margin - color: "transparent" - radius: parent.radius + Math.abs(modelData.margin) - border.color: modelData.color - border.width: 0 - z: modelData.z - } - } Column { width: parent.width - Theme.spacingL * 2 diff --git a/quickshell/Widgets/DankOSD.qml b/quickshell/Widgets/DankOSD.qml index b3679a26..821ba370 100644 --- a/quickshell/Widgets/DankOSD.qml +++ b/quickshell/Widgets/DankOSD.qml @@ -4,7 +4,6 @@ import Quickshell import Quickshell.Wayland import qs.Common import qs.Services -import qs.Widgets PanelWindow { id: root @@ -260,11 +259,13 @@ PanelWindow { readonly property real popupSurfaceAlpha: SettingsData.popupTransparency readonly property real effectiveShadowAlpha: Math.max(0, Math.min(1, shadowBaseAlpha * popupSurfaceAlpha * osdContainer.opacity)) - DankRectangle { + Rectangle { id: background anchors.fill: parent radius: Theme.cornerRadius color: Theme.withAlpha(Theme.surfaceContainer, osdContainer.popupSurfaceAlpha) + border.color: Theme.outlineMedium + border.width: 1 z: -1 } @@ -293,9 +294,12 @@ PanelWindow { } } - DankRectangle { + Rectangle { anchors.fill: parent radius: Theme.cornerRadius + color: Theme.surfaceContainer + border.color: Theme.outlineMedium + border.width: 1 } } diff --git a/quickshell/Widgets/DankPopout.qml b/quickshell/Widgets/DankPopout.qml index 02a9c4f4..d3f0798b 100644 --- a/quickshell/Widgets/DankPopout.qml +++ b/quickshell/Widgets/DankPopout.qml @@ -4,7 +4,6 @@ import Quickshell import Quickshell.Wayland import qs.Common import qs.Services -import qs.Widgets Item { id: root @@ -467,10 +466,12 @@ Item { } } - DankRectangle { + Rectangle { anchors.fill: parent radius: Theme.cornerRadius color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) + border.color: Theme.outlineMedium + border.width: 1 } Loader { diff --git a/quickshell/Widgets/DankRectangle.qml b/quickshell/Widgets/DankRectangle.qml deleted file mode 100644 index 2b9db346..00000000 --- a/quickshell/Widgets/DankRectangle.qml +++ /dev/null @@ -1,54 +0,0 @@ -import QtQuick -import QtQuick.Shapes -import qs.Common - -Item { - id: root - - property color color: Theme.surfaceContainer - property color borderColor: Theme.outlineMedium - property real borderWidth: 1 - property real radius: Theme.cornerRadius - property color overlayColor: "transparent" - - Shape { - anchors.fill: parent - preferredRendererType: Shape.CurveRenderer - - ShapePath { - fillColor: root.color - strokeColor: root.borderColor - strokeWidth: root.borderWidth - - startX: root.radius - startY: 0 - - PathLine { x: root.width - root.radius; y: 0 } - PathQuad { x: root.width; y: root.radius; controlX: root.width; controlY: 0 } - PathLine { x: root.width; y: root.height - root.radius } - PathQuad { x: root.width - root.radius; y: root.height; controlX: root.width; controlY: root.height } - PathLine { x: root.radius; y: root.height } - PathQuad { x: 0; y: root.height - root.radius; controlX: 0; controlY: root.height } - PathLine { x: 0; y: root.radius } - PathQuad { x: root.radius; y: 0; controlX: 0; controlY: 0 } - } - - ShapePath { - fillColor: root.overlayColor - strokeColor: "transparent" - strokeWidth: 0 - - startX: root.radius - startY: 0 - - PathLine { x: root.width - root.radius; y: 0 } - PathQuad { x: root.width; y: root.radius; controlX: root.width; controlY: 0 } - PathLine { x: root.width; y: root.height - root.radius } - PathQuad { x: root.width - root.radius; y: root.height; controlX: root.width; controlY: root.height } - PathLine { x: root.radius; y: root.height } - PathQuad { x: 0; y: root.height - root.radius; controlX: 0; controlY: root.height } - PathLine { x: 0; y: root.radius } - PathQuad { x: root.radius; y: 0; controlX: 0; controlY: 0 } - } - } -}