From 6b5a71bf74df4a2301e8e07aec070cf261c2a952 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 8 Aug 2025 21:57:46 +1000 Subject: controlcenter: fix clipping --- modules/controlcenter/bluetooth/BtPane.qml | 84 +++++++++++++++++------------- 1 file changed, 48 insertions(+), 36 deletions(-) (limited to 'modules/controlcenter/bluetooth/BtPane.qml') diff --git a/modules/controlcenter/bluetooth/BtPane.qml b/modules/controlcenter/bluetooth/BtPane.qml index 66fe0c8..96dc002 100644 --- a/modules/controlcenter/bluetooth/BtPane.qml +++ b/modules/controlcenter/bluetooth/BtPane.qml @@ -4,6 +4,7 @@ import ".." import qs.components.effects import qs.components.containers import qs.config +import Quickshell.Widgets import Quickshell.Bluetooth import QtQuick import QtQuick.Layouts @@ -23,6 +24,7 @@ RowLayout { Layout.fillHeight: true DeviceList { + anchors.fill: parent anchors.margins: Appearance.padding.large + Appearance.padding.normal anchors.leftMargin: Appearance.padding.large anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2 @@ -40,44 +42,52 @@ RowLayout { Layout.fillWidth: true Layout.fillHeight: true - Loader { - id: loader - - property BluetoothDevice pane: root.session.bt.active - + ClippingRectangle { anchors.fill: parent - anchors.margins: Appearance.padding.large * 2 + Appearance.padding.normal - anchors.leftMargin: Appearance.padding.large * 2 - anchors.rightMargin: Appearance.padding.large * 2 + Appearance.padding.normal / 2 - - asynchronous: true - sourceComponent: pane ? details : settings - - Behavior on pane { - SequentialAnimation { - ParallelAnimation { - Anim { - property: "opacity" - to: 0 - easing.bezierCurve: Appearance.anim.curves.standardAccel + anchors.margins: Appearance.padding.normal + anchors.leftMargin: 0 + anchors.rightMargin: Appearance.padding.normal / 2 + + radius: rightBorder.innerRadius + color: "transparent" + + Loader { + id: loader + + property BluetoothDevice pane: root.session.bt.active + + anchors.fill: parent + anchors.margins: Appearance.padding.large * 2 + + asynchronous: true + sourceComponent: pane ? details : settings + + Behavior on pane { + SequentialAnimation { + ParallelAnimation { + Anim { + property: "opacity" + to: 0 + easing.bezierCurve: Appearance.anim.curves.standardAccel + } + Anim { + property: "scale" + to: 0.8 + easing.bezierCurve: Appearance.anim.curves.standardAccel + } } - Anim { - property: "scale" - to: 0.8 - easing.bezierCurve: Appearance.anim.curves.standardAccel - } - } - PropertyAction {} - ParallelAnimation { - Anim { - property: "opacity" - to: 1 - easing.bezierCurve: Appearance.anim.curves.standardDecel - } - Anim { - property: "scale" - to: 1 - easing.bezierCurve: Appearance.anim.curves.standardDecel + PropertyAction {} + ParallelAnimation { + Anim { + property: "opacity" + to: 1 + easing.bezierCurve: Appearance.anim.curves.standardDecel + } + Anim { + property: "scale" + to: 1 + easing.bezierCurve: Appearance.anim.curves.standardDecel + } } } } @@ -85,6 +95,8 @@ RowLayout { } InnerBorder { + id: rightBorder + leftThickness: Appearance.padding.normal / 2 } -- cgit v1.2.3-freya