1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-07 14:22:07 -04:00

Add Privacy Mode

- Smoother notification expansions
- Shadow & Privacy Toggles
This commit is contained in:
purian23
2026-02-15 01:00:55 -05:00
committed by bbedward
parent 0dba11d845
commit fd05768059
8 changed files with 212 additions and 28 deletions

View File

@@ -10,6 +10,17 @@ DankPopout {
property bool notificationHistoryVisible: false
property var triggerScreen: null
property real stablePopupHeight: 400
property real _lastAlignedContentHeight: -1
function updateStablePopupHeight() {
const item = contentLoader.item;
const target = item ? Theme.px(item.implicitHeight, dpr) : 400;
if (Math.abs(target - _lastAlignedContentHeight) < 0.5)
return;
_lastAlignedContentHeight = target;
stablePopupHeight = target;
}
NotificationKeyboardController {
id: keyboardController
@@ -21,10 +32,11 @@ DankPopout {
}
popupWidth: triggerScreen ? Math.min(500, Math.max(380, triggerScreen.width - 48)) : 400
popupHeight: contentLoader.item ? contentLoader.item.implicitHeight : 400
popupHeight: stablePopupHeight
positioning: ""
animationScaleCollapsed: 1.0
animationOffset: 0
suspendShadowWhileResizing: true
screen: triggerScreen
shouldBeVisible: notificationHistoryVisible
@@ -68,14 +80,25 @@ DankPopout {
Connections {
target: contentLoader
function onLoaded() {
root.updateStablePopupHeight();
if (root.shouldBeVisible)
Qt.callLater(root.setupKeyboardNavigation);
}
}
Connections {
target: contentLoader.item
function onImplicitHeightChanged() {
root.updateStablePopupHeight();
}
}
onDprChanged: updateStablePopupHeight()
onShouldBeVisibleChanged: {
if (shouldBeVisible) {
NotificationService.onOverlayOpen();
updateStablePopupHeight();
if (contentLoader.item)
Qt.callLater(setupKeyboardNavigation);
} else {