From 138854dcbc8ac46009514a78a2a3f549ae8f3838 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 20 Apr 2025 12:32:04 +0200 Subject: [PATCH] clipping rounding for scrollables --- .../modules/common/widgets/NotificationWidget.qml | 10 +++++++++- .../modules/sidebarRight/CenterWidgetGroup.qml | 11 ++++++++++- .../sidebarRight/notifications/NotificationList.qml | 11 ++++++++++- .../quickshell/modules/sidebarRight/todo/TaskList.qml | 11 ++++++++++- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/.config/quickshell/modules/common/widgets/NotificationWidget.qml b/.config/quickshell/modules/common/widgets/NotificationWidget.qml index 01c46072d..204208df0 100644 --- a/.config/quickshell/modules/common/widgets/NotificationWidget.qml +++ b/.config/quickshell/modules/common/widgets/NotificationWidget.qml @@ -425,7 +425,15 @@ Item { implicitHeight: expanded ? actionRowLayout.implicitHeight : 0 height: expanded ? actionRowLayout.implicitHeight : 0 contentWidth: actionRowLayout.implicitWidth - clip: true + + layer.enabled: true + layer.effect: OpacityMask { + maskSource: Rectangle { + width: actionsFlickable.width + height: actionsFlickable.height + radius: Appearance.rounding.small + } + } opacity: expanded ? 1 : 0 visible: opacity > 0 diff --git a/.config/quickshell/modules/sidebarRight/CenterWidgetGroup.qml b/.config/quickshell/modules/sidebarRight/CenterWidgetGroup.qml index bb0b66151..4230a6064 100644 --- a/.config/quickshell/modules/sidebarRight/CenterWidgetGroup.qml +++ b/.config/quickshell/modules/sidebarRight/CenterWidgetGroup.qml @@ -4,6 +4,7 @@ import "root:/services" import "./calendar" import "./todo" import "./notifications" +import Qt5Compat.GraphicalEffects import QtQuick import QtQuick.Controls import QtQuick.Layouts @@ -111,10 +112,18 @@ Rectangle { Layout.topMargin: 10 Layout.fillWidth: true Layout.fillHeight: true - clip: true currentIndex: currentTab onCurrentIndexChanged: currentTab = currentIndex + layer.enabled: true + layer.effect: OpacityMask { + maskSource: Rectangle { + width: swipeView.width + height: swipeView.height + radius: Appearance.rounding.normal + } + } + NotificationList {} Item{} } diff --git a/.config/quickshell/modules/sidebarRight/notifications/NotificationList.qml b/.config/quickshell/modules/sidebarRight/notifications/NotificationList.qml index 1fbfcc349..e5b6465ea 100644 --- a/.config/quickshell/modules/sidebarRight/notifications/NotificationList.qml +++ b/.config/quickshell/modules/sidebarRight/notifications/NotificationList.qml @@ -1,6 +1,7 @@ import "root:/modules/common" import "root:/modules/common/widgets" import "root:/services" +import Qt5Compat.GraphicalEffects import QtQuick import QtQuick.Controls import QtQuick.Layouts @@ -58,7 +59,15 @@ Item { anchors.top: parent.top anchors.bottom: statusRow.top contentHeight: columnLayout.height - clip: true + + layer.enabled: true + layer.effect: OpacityMask { + maskSource: Rectangle { + width: flickable.width + height: flickable.height + radius: Appearance.rounding.normal + } + } ColumnLayout { // Scrollable window content id: columnLayout diff --git a/.config/quickshell/modules/sidebarRight/todo/TaskList.qml b/.config/quickshell/modules/sidebarRight/todo/TaskList.qml index aca35af3a..f68dadaec 100644 --- a/.config/quickshell/modules/sidebarRight/todo/TaskList.qml +++ b/.config/quickshell/modules/sidebarRight/todo/TaskList.qml @@ -1,6 +1,7 @@ import "root:/modules/common" import "root:/modules/common/widgets" import "root:/services" +import Qt5Compat.GraphicalEffects import QtQuick import QtQuick.Controls import QtQuick.Layouts @@ -19,7 +20,15 @@ Item { id: flickable anchors.fill: parent contentHeight: columnLayout.height - clip: true + + layer.enabled: true + layer.effect: OpacityMask { + maskSource: Rectangle { + width: flickable.width + height: flickable.height + radius: Appearance.rounding.small + } + } ColumnLayout { id: columnLayout