From c126075d40d670c38ddb00898c70134e6e23c5bc Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 6 Apr 2026 23:41:23 +1000 Subject: [PATCH] chore: clean out legacy background code --- modules/bar/popouts/Background.qml | 73 ---------------------- modules/dashboard/Background.qml | 66 -------------------- modules/drawers/Backgrounds.qml | 91 ---------------------------- modules/drawers/Border.qml | 45 -------------- modules/drawers/ContentWindow.qml | 9 --- modules/launcher/Background.qml | 60 ------------------ modules/notifications/Background.qml | 53 ---------------- modules/osd/Background.qml | 59 ------------------ modules/session/Background.qml | 60 ------------------ modules/sidebar/Background.qml | 50 --------------- 10 files changed, 566 deletions(-) delete mode 100644 modules/bar/popouts/Background.qml delete mode 100644 modules/dashboard/Background.qml delete mode 100644 modules/drawers/Backgrounds.qml delete mode 100644 modules/drawers/Border.qml delete mode 100644 modules/launcher/Background.qml delete mode 100644 modules/notifications/Background.qml delete mode 100644 modules/osd/Background.qml delete mode 100644 modules/session/Background.qml delete mode 100644 modules/sidebar/Background.qml diff --git a/modules/bar/popouts/Background.qml b/modules/bar/popouts/Background.qml deleted file mode 100644 index cfba86d3..00000000 --- a/modules/bar/popouts/Background.qml +++ /dev/null @@ -1,73 +0,0 @@ -import QtQuick -import QtQuick.Shapes -import qs.components -import qs.services -import qs.config - -ShapePath { - id: root - - required property Wrapper wrapper - required property bool invertBottomRounding - readonly property real rounding: wrapper.isDetached ? Appearance.rounding.normal : Config.border.rounding - readonly property bool flatten: wrapper.width < rounding * 2 - readonly property real roundingX: flatten ? wrapper.width / 2 : rounding - property real ibr: invertBottomRounding ? -1 : 1 - - property real sideRounding: startX > 0 ? -1 : 1 - - strokeWidth: -1 - fillColor: Colours.palette.m3surface - - PathArc { - relativeX: root.roundingX - relativeY: root.rounding * root.sideRounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - direction: root.sideRounding < 0 ? PathArc.Clockwise : PathArc.Counterclockwise - } - PathLine { - relativeX: root.wrapper.width - root.roundingX * 2 - relativeY: 0 - } - PathArc { - relativeX: root.roundingX - relativeY: root.rounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - } - PathLine { - relativeX: 0 - relativeY: root.wrapper.height - root.rounding * 2 - } - PathArc { - relativeX: -root.roundingX * root.ibr - relativeY: root.rounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - direction: root.ibr < 0 ? PathArc.Counterclockwise : PathArc.Clockwise - } - PathLine { - relativeX: -(root.wrapper.width - root.roundingX - root.roundingX * root.ibr) - relativeY: 0 - } - PathArc { - relativeX: -root.roundingX - relativeY: root.rounding * root.sideRounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - direction: root.sideRounding < 0 ? PathArc.Clockwise : PathArc.Counterclockwise - } - - Behavior on fillColor { - CAnim {} - } - - Behavior on ibr { - Anim {} - } - - Behavior on sideRounding { - Anim {} - } -} diff --git a/modules/dashboard/Background.qml b/modules/dashboard/Background.qml deleted file mode 100644 index c6223eb6..00000000 --- a/modules/dashboard/Background.qml +++ /dev/null @@ -1,66 +0,0 @@ -import QtQuick -import QtQuick.Shapes -import qs.components -import qs.services -import qs.config - -ShapePath { - id: root - - required property Wrapper wrapper - readonly property real rounding: Config.border.rounding - readonly property bool flatten: wrapper.height < rounding * 2 - readonly property real roundingY: flatten ? wrapper.height / 2 : rounding - - strokeWidth: -1 - fillColor: Colours.palette.m3surface - - PathArc { - relativeX: root.rounding - relativeY: root.roundingY - radiusX: root.rounding - radiusY: Math.min(root.rounding, root.wrapper.height) - } - - PathLine { - relativeX: 0 - relativeY: root.wrapper.height - root.roundingY * 2 - } - - PathArc { - relativeX: root.rounding - relativeY: root.roundingY - radiusX: root.rounding - radiusY: Math.min(root.rounding, root.wrapper.height) - direction: PathArc.Counterclockwise - } - - PathLine { - relativeX: root.wrapper.width - root.rounding * 2 - relativeY: 0 - } - - PathArc { - relativeX: root.rounding - relativeY: -root.roundingY - radiusX: root.rounding - radiusY: Math.min(root.rounding, root.wrapper.height) - direction: PathArc.Counterclockwise - } - - PathLine { - relativeX: 0 - relativeY: -(root.wrapper.height - root.roundingY * 2) - } - - PathArc { - relativeX: root.rounding - relativeY: -root.roundingY - radiusX: root.rounding - radiusY: Math.min(root.rounding, root.wrapper.height) - } - - Behavior on fillColor { - CAnim {} - } -} diff --git a/modules/drawers/Backgrounds.qml b/modules/drawers/Backgrounds.qml deleted file mode 100644 index 7592411c..00000000 --- a/modules/drawers/Backgrounds.qml +++ /dev/null @@ -1,91 +0,0 @@ -import QtQuick -import QtQuick.Shapes -import qs.config -import qs.modules.dashboard as Dashboard -import qs.modules.launcher as Launcher -import qs.modules.notifications as Notifications -import qs.modules.osd as Osd -import qs.modules.session as Session -import qs.modules.sidebar as Sidebar -import qs.modules.utilities as Utilities -import qs.modules.bar.popouts as BarPopouts - -Shape { - id: root - - required property Panels panels - required property Item bar - required property real borderThickness - required property real borderRounding - - anchors.fill: parent - anchors.margins: root.borderThickness - anchors.leftMargin: bar.implicitWidth - preferredRendererType: Shape.CurveRenderer - - Osd.Background { - wrapper: root.panels.osd // qmllint disable incompatible-type - rounding: Config.border.rounding - - startX: root.width - root.panels.session.width - root.panels.sidebar.width - startY: (root.height - wrapper.height) / 2 - rounding - } - - Notifications.Background { - wrapper: root.panels.notifications // qmllint disable incompatible-type - sidebar: sidebar - rounding: Config.border.rounding - - startX: root.width - startY: 0 - } - - Session.Background { - wrapper: root.panels.session // qmllint disable incompatible-type - - startX: root.width - root.panels.sidebar.width - startY: (root.height - wrapper.height) / 2 - rounding - } - - Launcher.Background { - wrapper: root.panels.launcher // qmllint disable incompatible-type - - startX: (root.width - wrapper.width) / 2 - rounding - startY: root.height - } - - Dashboard.Background { - wrapper: root.panels.dashboard // qmllint disable incompatible-type - - startX: (root.width - wrapper.width) / 2 - rounding - startY: 0 - } - - BarPopouts.Background { - wrapper: root.panels.popouts // qmllint disable incompatible-type - invertBottomRounding: wrapper.y + wrapper.height + 1 >= root.height - - startX: wrapper.x - startY: wrapper.y - rounding * sideRounding - } - - Utilities.Background { - wrapper: root.panels.utilities // qmllint disable incompatible-type - sidebar: sidebar - rounding: root.borderRounding - - startX: root.width - startY: root.height - } - - Sidebar.Background { - id: sidebar - - wrapper: root.panels.sidebar // qmllint disable incompatible-type - panels: root.panels - rounding: root.borderRounding - - startX: root.width - startY: root.panels.notifications.height - } -} diff --git a/modules/drawers/Border.qml b/modules/drawers/Border.qml deleted file mode 100644 index a638479d..00000000 --- a/modules/drawers/Border.qml +++ /dev/null @@ -1,45 +0,0 @@ -pragma ComponentBehavior: Bound - -import QtQuick -import QtQuick.Effects -import qs.components -import qs.services - -Item { - id: root - - required property Item bar - required property real borderThickness - required property real borderRounding - - anchors.fill: parent - - StyledRect { - anchors.fill: parent - color: Colours.palette.m3surface - - layer.enabled: true - layer.effect: MultiEffect { - maskSource: mask - maskEnabled: true - maskInverted: true - maskThresholdMin: 0.5 - maskSpreadAtMin: 1 - } - } - - Item { - id: mask - - anchors.fill: parent - layer.enabled: true - visible: false - - Rectangle { - anchors.fill: parent - anchors.margins: root.borderThickness - anchors.leftMargin: root.bar.implicitWidth - radius: root.borderRounding - } - } -} diff --git a/modules/drawers/ContentWindow.qml b/modules/drawers/ContentWindow.qml index 7171c8c5..c161869a 100644 --- a/modules/drawers/ContentWindow.qml +++ b/modules/drawers/ContentWindow.qml @@ -130,15 +130,6 @@ StyledWindow { shadowColor: Qt.alpha(Colours.palette.m3shadow, Math.max(0, root.shadowOpacity)) } - // Border { - // bar: bar - // } - - // Backgrounds { - // panels: panels - // bar: bar - // } - BlobGroup { id: blobGroup diff --git a/modules/launcher/Background.qml b/modules/launcher/Background.qml deleted file mode 100644 index 508c75d4..00000000 --- a/modules/launcher/Background.qml +++ /dev/null @@ -1,60 +0,0 @@ -import QtQuick -import QtQuick.Shapes -import qs.components -import qs.services -import qs.config - -ShapePath { - id: root - - required property Wrapper wrapper - readonly property real rounding: Config.border.rounding - readonly property bool flatten: wrapper.height < rounding * 2 - readonly property real roundingY: flatten ? wrapper.height / 2 : rounding - - strokeWidth: -1 - fillColor: Colours.palette.m3surface - - PathArc { - relativeX: root.rounding - relativeY: -root.roundingY - radiusX: root.rounding - radiusY: Math.min(root.rounding, root.wrapper.height) - direction: PathArc.Counterclockwise - } - PathLine { - relativeX: 0 - relativeY: -(root.wrapper.height - root.roundingY * 2) - } - PathArc { - relativeX: root.rounding - relativeY: -root.roundingY - radiusX: root.rounding - radiusY: Math.min(root.rounding, root.wrapper.height) - } - PathLine { - relativeX: root.wrapper.width - root.rounding * 2 - relativeY: 0 - } - PathArc { - relativeX: root.rounding - relativeY: root.roundingY - radiusX: root.rounding - radiusY: Math.min(root.rounding, root.wrapper.height) - } - PathLine { - relativeX: 0 - relativeY: root.wrapper.height - root.roundingY * 2 - } - PathArc { - relativeX: root.rounding - relativeY: root.roundingY - radiusX: root.rounding - radiusY: Math.min(root.rounding, root.wrapper.height) - direction: PathArc.Counterclockwise - } - - Behavior on fillColor { - CAnim {} - } -} diff --git a/modules/notifications/Background.qml b/modules/notifications/Background.qml deleted file mode 100644 index 740cda10..00000000 --- a/modules/notifications/Background.qml +++ /dev/null @@ -1,53 +0,0 @@ -import QtQuick -import QtQuick.Shapes -import qs.components -import qs.services - -ShapePath { - id: root - - required property Wrapper wrapper - required property var sidebar - required property real rounding - readonly property bool flatten: wrapper.height < rounding * 2 - readonly property real roundingY: flatten ? wrapper.height / 2 : rounding - - strokeWidth: -1 - fillColor: Colours.palette.m3surface - - PathLine { - relativeX: -(root.wrapper.width + root.rounding) - relativeY: 0 - } - PathArc { - relativeX: root.rounding - relativeY: root.roundingY - radiusX: root.rounding - radiusY: Math.min(root.rounding, root.wrapper.height) - } - PathLine { - relativeX: 0 - relativeY: root.wrapper.height - root.roundingY * 2 - } - PathArc { - relativeX: root.rounding - relativeY: root.roundingY - radiusX: root.rounding - radiusY: Math.min(root.rounding, root.wrapper.height) - direction: PathArc.Counterclockwise - } - PathLine { - relativeX: root.wrapper.height > 0 ? root.wrapper.width - root.rounding * 2 : root.wrapper.width - relativeY: 0 - } - PathArc { - relativeX: root.rounding - relativeY: root.rounding - radiusX: root.rounding - radiusY: root.rounding - } - - Behavior on fillColor { - CAnim {} - } -} diff --git a/modules/osd/Background.qml b/modules/osd/Background.qml deleted file mode 100644 index 330c703e..00000000 --- a/modules/osd/Background.qml +++ /dev/null @@ -1,59 +0,0 @@ -import QtQuick -import QtQuick.Shapes -import qs.components -import qs.services - -ShapePath { - id: root - - required property Wrapper wrapper - required property real rounding - readonly property bool flatten: wrapper.width < rounding * 2 - readonly property real roundingX: flatten ? wrapper.width / 2 : rounding - - strokeWidth: -1 - fillColor: Colours.palette.m3surface - - PathArc { - relativeX: -root.roundingX - relativeY: root.rounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - } - PathLine { - relativeX: -(root.wrapper.width - root.roundingX * 2) - relativeY: 0 - } - PathArc { - relativeX: -root.roundingX - relativeY: root.rounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - direction: PathArc.Counterclockwise - } - PathLine { - relativeX: 0 - relativeY: root.wrapper.height - root.rounding * 2 - } - PathArc { - relativeX: root.roundingX - relativeY: root.rounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - direction: PathArc.Counterclockwise - } - PathLine { - relativeX: root.wrapper.width - root.roundingX * 2 - relativeY: 0 - } - PathArc { - relativeX: root.roundingX - relativeY: root.rounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - } - - Behavior on fillColor { - CAnim {} - } -} diff --git a/modules/session/Background.qml b/modules/session/Background.qml deleted file mode 100644 index a609f460..00000000 --- a/modules/session/Background.qml +++ /dev/null @@ -1,60 +0,0 @@ -import QtQuick -import QtQuick.Shapes -import qs.components -import qs.services -import qs.config - -ShapePath { - id: root - - required property Wrapper wrapper - readonly property real rounding: Config.border.rounding - readonly property bool flatten: wrapper.width < rounding * 2 - readonly property real roundingX: flatten ? wrapper.width / 2 : rounding - - strokeWidth: -1 - fillColor: Colours.palette.m3surface - - PathArc { - relativeX: -root.roundingX - relativeY: root.rounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - } - PathLine { - relativeX: -(root.wrapper.width - root.roundingX * 2) - relativeY: 0 - } - PathArc { - relativeX: -root.roundingX - relativeY: root.rounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - direction: PathArc.Counterclockwise - } - PathLine { - relativeX: 0 - relativeY: root.wrapper.height - root.rounding * 2 - } - PathArc { - relativeX: root.roundingX - relativeY: root.rounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - direction: PathArc.Counterclockwise - } - PathLine { - relativeX: root.wrapper.width - root.roundingX * 2 - relativeY: 0 - } - PathArc { - relativeX: root.roundingX - relativeY: root.rounding - radiusX: Math.min(root.rounding, root.wrapper.width) - radiusY: root.rounding - } - - Behavior on fillColor { - CAnim {} - } -} diff --git a/modules/sidebar/Background.qml b/modules/sidebar/Background.qml deleted file mode 100644 index c7d42123..00000000 --- a/modules/sidebar/Background.qml +++ /dev/null @@ -1,50 +0,0 @@ -import QtQuick -import QtQuick.Shapes -import qs.components -import qs.services - -ShapePath { - id: root - - required property Wrapper wrapper - required property var panels - required property real rounding - - readonly property real notifsWidthDiff: panels.notifications.width - wrapper.width - readonly property real notifsRoundingX: panels.notifications.height > 0 && notifsWidthDiff < rounding * 2 ? notifsWidthDiff / 2 : rounding - - readonly property real utilsWidthDiff: panels.utilities.width - wrapper.width - readonly property real utilsRoundingX: utilsWidthDiff < rounding * 2 ? utilsWidthDiff / 2 : rounding - - strokeWidth: -1 - fillColor: Colours.palette.m3surface - - PathLine { - relativeX: -root.wrapper.width - root.notifsRoundingX - relativeY: 0 - } - PathArc { - relativeX: root.notifsRoundingX - relativeY: root.rounding - radiusX: root.notifsRoundingX - radiusY: root.rounding - } - PathLine { - relativeX: 0 - relativeY: root.wrapper.height - root.rounding * 2 - } - PathArc { - relativeX: -root.utilsRoundingX - relativeY: root.rounding - radiusX: root.utilsRoundingX - radiusY: root.rounding - } - PathLine { - relativeX: root.wrapper.width + root.utilsRoundingX - relativeY: 0 - } - - Behavior on fillColor { - CAnim {} - } -}