mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-17 16:54:01 -04:00
launcher/notifications: drop view transitions, fade rows via DListView.fadeIn
This commit is contained in:
+1
-1
Submodule dank-qml-common updated: d5786555cc...c84a6713ce
Generated
+3
-3
@@ -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": {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user