From 2fd472b89a64bd6e14fb4a5019e2b4b4e837b2ee Mon Sep 17 00:00:00 2001 From: bbedward Date: Thu, 8 Oct 2026 10:47:43 -0400 Subject: [PATCH] launcher/notifications: drop view transitions, fade rows via DListView.fadeIn --- dank-qml-common | 2 +- flake.lock | 6 +++--- quickshell/Common/ListViewTransitions.qml | 13 ------------- quickshell/Modals/DLauncherV2/ResultsList.qml | 7 ++----- quickshell/Modals/Settings/SettingsContent.qml | 5 ++++- .../Center/HistoryNotificationList.qml | 8 +++----- .../Center/KeyboardNavigatedNotificationList.qml | 8 +++----- 7 files changed, 16 insertions(+), 33 deletions(-) delete mode 100644 quickshell/Common/ListViewTransitions.qml diff --git a/dank-qml-common b/dank-qml-common index d5786555c..c84a6713c 160000 --- a/dank-qml-common +++ b/dank-qml-common @@ -1 +1 @@ -Subproject commit d5786555ccd248491017b0cf8d1bfbd9e0892e5b +Subproject commit c84a6713ce4c0229a47ce6d399277f37554a00ab diff --git a/flake.lock b/flake.lock index 471409e62..fd3cf30d5 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "dank-qml-common": { "flake": false, "locked": { - "lastModified": 1791415314, - "narHash": "sha256-7tV9UFCKTOk8EN7gdtFJeI8NFXtopCJFC86KJU4qK44=", + "lastModified": 1791470837, + "narHash": "sha256-kX9eCE6wjReNCWZ0UNl8NSXe2pp89JFTXLtG6daudNA=", "owner": "AvengeMedia", "repo": "dank-qml-common", - "rev": "d5786555ccd248491017b0cf8d1bfbd9e0892e5b", + "rev": "c84a6713ce4c0229a47ce6d399277f37554a00ab", "type": "github" }, "original": { diff --git a/quickshell/Common/ListViewTransitions.qml b/quickshell/Common/ListViewTransitions.qml deleted file mode 100644 index fad7d3376..000000000 --- a/quickshell/Common/ListViewTransitions.qml +++ /dev/null @@ -1,13 +0,0 @@ -pragma Singleton - -import QtQuick -import Quickshell -import qs.DCommon.Common as DCommon - -Singleton { - readonly property bool enabled: DCommon.ListViewTransitions.enabled - readonly property Transition add: DCommon.ListViewTransitions.add - readonly property Transition remove: DCommon.ListViewTransitions.remove - readonly property Transition displaced: DCommon.ListViewTransitions.displaced - readonly property Transition move: DCommon.ListViewTransitions.move -} diff --git a/quickshell/Modals/DLauncherV2/ResultsList.qml b/quickshell/Modals/DLauncherV2/ResultsList.qml index ca1ec909b..a72aa6c17 100644 --- a/quickshell/Modals/DLauncherV2/ResultsList.qml +++ b/quickshell/Modals/DLauncherV2/ResultsList.qml @@ -303,11 +303,6 @@ Item { objectProp: "_rowId" } - add: ListViewTransitions.add - remove: ListViewTransitions.remove - displaced: null - move: null - currentIndex: root._flatIndexToRowMap[root.controller?.selectedFlatIndex] ?? -1 highlightFollowsCurrentItem: false highlight: LauncherHighlight { @@ -336,6 +331,8 @@ Item { width: mainListView.width height: modelData?.height ?? LauncherMetrics.rowHeight + Component.onCompleted: mainListView.fadeIn(delegateRoot, index) + Loader { active: delegateRoot.rowType === "list_item" sourceComponent: Rectangle { diff --git a/quickshell/Modals/Settings/SettingsContent.qml b/quickshell/Modals/Settings/SettingsContent.qml index e5bbc1c47..ebc2150cd 100644 --- a/quickshell/Modals/Settings/SettingsContent.qml +++ b/quickshell/Modals/Settings/SettingsContent.qml @@ -235,8 +235,11 @@ FocusScope { const deferred = parentModal?.visible ?? false; const pages = []; for (let index = shared; index < pagePath.length; index++) { + const top = index === pagePath.length - 1; const page = _createPage(pagePath[index], index); - page.load(deferred && index === pagePath.length - 1); + // StackView only transitions the top of a multi-item push; pages beneath stay painted until hidden here + page.visible = top; + page.load(deferred && top); pages.push(page); } if (shared < pageStack.depth) { diff --git a/quickshell/Modules/Notifications/Center/HistoryNotificationList.qml b/quickshell/Modules/Notifications/Center/HistoryNotificationList.qml index 4698c446d..be99702de 100644 --- a/quickshell/Modules/Notifications/Center/HistoryNotificationList.qml +++ b/quickshell/Modules/Notifications/Center/HistoryNotificationList.qml @@ -1,6 +1,5 @@ import QtQuick import qs.Modules.Notifications -import qs.DCommon.Common as DC import Quickshell import qs.Common import qs.Services @@ -245,10 +244,7 @@ Item { leftMargin: root.swipeBleed rightMargin: root.swipeBleed spacing: Theme.groupedListGap - - add: NotificationMetrics.animationsEnabled ? DC.ListViewTransitions.add : null - remove: NotificationMetrics.animationsEnabled ? DC.ListViewTransitions.fadeRemove : null - displaced: NotificationMetrics.animationsEnabled ? DC.ListViewTransitions.displaced : null + rowFadeEnabled: NotificationMetrics.animationsEnabled model: ScriptModel { id: historyModel @@ -275,6 +271,8 @@ Item { height: historyCard.height onDismissed: root.removeWithScrollPreserve(modelData?.id || "") + Component.onCompleted: historyListView.fadeIn(delegateRoot, index) + HistoryNotificationCard { id: historyCard width: parent.width diff --git a/quickshell/Modules/Notifications/Center/KeyboardNavigatedNotificationList.qml b/quickshell/Modules/Notifications/Center/KeyboardNavigatedNotificationList.qml index 44de44ea2..fc52f654f 100644 --- a/quickshell/Modules/Notifications/Center/KeyboardNavigatedNotificationList.qml +++ b/quickshell/Modules/Notifications/Center/KeyboardNavigatedNotificationList.qml @@ -2,7 +2,6 @@ import QtQuick import "." as Center import Quickshell import qs.Modules.Notifications -import qs.DCommon.Common as DC import qs.Common import qs.Services import qs.DCommon.Widgets @@ -175,11 +174,8 @@ DListView { model: ScriptModel { values: NotificationService.groupedNotifications.map(group => group.key) } - add: NotificationMetrics.animationsEnabled ? DC.ListViewTransitions.add : null - remove: NotificationMetrics.animationsEnabled ? DC.ListViewTransitions.fadeRemove : null - displaced: NotificationMetrics.animationsEnabled ? DC.ListViewTransitions.displaced : null - move: NotificationMetrics.animationsEnabled ? DC.ListViewTransitions.move : null spacing: Theme.groupedListGap + rowFadeEnabled: NotificationMetrics.animationsEnabled onIsUserScrollingChanged: { if (isUserScrolling && keyboardController && keyboardController.keyboardNavigationActive) { @@ -246,6 +242,8 @@ DListView { height: notificationCard.height onDismissed: NotificationService.dismissGroup(modelData) + Component.onCompleted: listView.fadeIn(delegateRoot, index) + Center.NotificationCard { id: notificationCard width: parent.width