1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-03 02:52:07 -04:00

general fixes and audit

This commit is contained in:
bbedward
2026-05-01 11:58:43 -04:00
committed by purian23
parent 9018002959
commit 5f1cff2e58
12 changed files with 232 additions and 102 deletions

View File

@@ -145,7 +145,6 @@ Variants {
return Math.round(v * _dpr) / _dpr;
}
// ─── ConnectedModeState sync ────────────────────────────────────────
// Dock window origin in screen-relative coordinates (FrameWindow space).
function _dockWindowOriginX() {
if (!dock.isVertical)

View File

@@ -49,7 +49,6 @@ PanelWindow {
readonly property var _notifState: ConnectedModeState.notificationStates[win._screenName] || ConnectedModeState.emptyNotificationState
readonly property var _modalState: ConnectedModeState.modalStates[win._screenName] || ConnectedModeState.emptyModalState
// ─── Connected chrome convenience properties ──────────────────────────────
readonly property bool _connectedActive: win._frameActive && SettingsData.connectedFrameModeActive
readonly property string _barSide: {
const edges = win.barEdges;
@@ -780,7 +779,6 @@ PanelWindow {
radius: win._blurCutoutRadius
}
// ── Connected popout blur regions ──
Region {
item: _popoutBodyBlurAnchor
radius: win._surfaceRadius
@@ -827,7 +825,6 @@ PanelWindow {
}
}
// ── Connected dock blur regions ──
Region {
item: _dockBodyBlurAnchor
radius: win._dockBodyBlurRadius()
@@ -898,7 +895,6 @@ PanelWindow {
}
}
// ── Connected modal blur regions ──
Region {
item: _modalBodyBlurAnchor
radius: win._surfaceRadius
@@ -946,8 +942,6 @@ PanelWindow {
}
}
// ─── Connector position helpers ────────────────────────────────────────
function _dockBodyBlurRadius() {
return _dockBodyBlurAnchor._active ? Math.max(0, Math.min(win._surfaceRadius, _dockBodyBlurAnchor.width / 2, _dockBodyBlurAnchor.height / 2)) : win._surfaceRadius;
}
@@ -1219,8 +1213,6 @@ PanelWindow {
return (arcCorner === "topLeft" || arcCorner === "topRight") ? connectorY - r : connectorY + connectorHeight - r;
}
// ─── Blur build / teardown ────────────────────────────────────────────────
function _buildBlur() {
try {
if (!BlurService.enabled || !SettingsData.frameBlurEnabled || !win._frameActive || !win.visible) {
@@ -1297,8 +1289,6 @@ PanelWindow {
Component.onCompleted: Qt.callLater(() => win._buildBlur())
Component.onDestruction: win._teardownBlur()
// ─── Frame border ─────────────────────────────────────────────────────────
FrameBorder {
anchors.fill: parent
visible: win._frameActive && !win._connectedActive
@@ -1309,8 +1299,6 @@ PanelWindow {
cutoutRadius: win.cutoutRadius
}
// ─── Connected chrome fills ───────────────────────────────────────────────
Item {
id: _connectedSurfaceLayer
anchors.fill: parent

View File

@@ -130,8 +130,8 @@ Scope {
MouseArea {
anchors.fill: parent
onClicked: mouse => {
const localPos = mapToItem(contentContainer, mouse.x, mouse.y);
if (localPos.x < 0 || localPos.x > contentContainer.width || localPos.y < 0 || localPos.y > contentContainer.height) {
const localPos = mapToItem(contentAnchor, mouse.x, mouse.y);
if (localPos.x < 0 || localPos.x > contentAnchor.width || localPos.y < 0 || localPos.y > contentAnchor.height) {
overviewScope.overviewOpen = false;
closeTimer.restart();
}
@@ -140,47 +140,24 @@ Scope {
}
Item {
id: contentContainer
id: contentAnchor
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 100
width: childrenRect.width
height: childrenRect.height
width: contentContainer.width
height: contentContainer.height
opacity: overviewScope.overviewOpen ? 1 : 0
transform: [scaleTransform, motionTransform]
Item {
id: contentContainer
width: childrenRect.width
height: childrenRect.height
transformOrigin: Item.Center
Scale {
id: scaleTransform
origin.x: contentContainer.width / 2
origin.y: contentContainer.height / 2
xScale: overviewScope.overviewOpen ? 1 : Theme.effectScaleCollapsed
yScale: overviewScope.overviewOpen ? 1 : Theme.effectScaleCollapsed
Behavior on xScale {
NumberAnimation {
duration: Theme.variantDuration(Theme.expressiveDurations.expressiveDefaultSpatial, overviewScope.overviewOpen)
easing.type: Easing.BezierSpline
easing.bezierCurve: overviewScope.overviewOpen ? Theme.variantModalEnterCurve : Theme.variantModalExitCurve
}
}
Behavior on yScale {
NumberAnimation {
duration: Theme.variantDuration(Theme.expressiveDurations.expressiveDefaultSpatial, overviewScope.overviewOpen)
easing.type: Easing.BezierSpline
easing.bezierCurve: overviewScope.overviewOpen ? Theme.variantModalEnterCurve : Theme.variantModalExitCurve
}
}
}
Translate {
id: motionTransform
opacity: overviewScope.overviewOpen ? 1 : 0
scale: overviewScope.overviewOpen ? 1 : Theme.effectScaleCollapsed
x: {
if (overviewScope.overviewOpen)
return 0;
if (Theme.isDirectionalEffect)
return 0;
if (Theme.isDepthEffect)
return Theme.effectAnimOffset * 0.25;
return 0;
@@ -195,8 +172,24 @@ Scope {
return Theme.effectAnimOffset;
}
Behavior on opacity {
OpacityAnimator {
duration: Theme.variantDuration(Theme.expressiveDurations.expressiveDefaultSpatial, overviewScope.overviewOpen)
easing.type: Easing.BezierSpline
easing.bezierCurve: overviewScope.overviewOpen ? Theme.variantModalEnterCurve : Theme.variantModalExitCurve
}
}
Behavior on scale {
ScaleAnimator {
duration: Theme.variantDuration(Theme.expressiveDurations.expressiveDefaultSpatial, overviewScope.overviewOpen)
easing.type: Easing.BezierSpline
easing.bezierCurve: overviewScope.overviewOpen ? Theme.variantModalEnterCurve : Theme.variantModalExitCurve
}
}
Behavior on x {
NumberAnimation {
XAnimator {
duration: Theme.variantDuration(Theme.expressiveDurations.expressiveDefaultSpatial, overviewScope.overviewOpen)
easing.type: Easing.BezierSpline
easing.bezierCurve: overviewScope.overviewOpen ? Theme.variantModalEnterCurve : Theme.variantModalExitCurve
@@ -204,30 +197,22 @@ Scope {
}
Behavior on y {
NumberAnimation {
YAnimator {
duration: Theme.variantDuration(Theme.expressiveDurations.expressiveDefaultSpatial, overviewScope.overviewOpen)
easing.type: Easing.BezierSpline
easing.bezierCurve: overviewScope.overviewOpen ? Theme.variantModalEnterCurve : Theme.variantModalExitCurve
}
}
}
Behavior on opacity {
OpacityAnimator {
duration: Theme.variantDuration(Theme.expressiveDurations.expressiveDefaultSpatial, overviewScope.overviewOpen)
easing.type: Easing.BezierSpline
easing.bezierCurve: overviewScope.overviewOpen ? Theme.variantModalEnterCurve : Theme.variantModalExitCurve
}
}
Loader {
id: overviewLoader
active: overviewScope.overviewOpen
asynchronous: false
Loader {
id: overviewLoader
active: overviewScope.overviewOpen
asynchronous: false
sourceComponent: OverviewWidget {
panelWindow: root
overviewOpen: overviewScope.overviewOpen
sourceComponent: OverviewWidget {
panelWindow: root
overviewOpen: overviewScope.overviewOpen
}
}
}
}