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

optimizations for animation behaviors

This commit is contained in:
bbedward
2026-05-01 22:23:06 -04:00
parent 68d68e21b1
commit 2f3b6ca814
8 changed files with 356 additions and 511 deletions

View File

@@ -161,12 +161,22 @@ Singleton {
};
}
function _sameDockState(a, b) {
if (!a || !b)
return false;
return a.reveal === b.reveal && a.barSide === b.barSide && Math.abs(a.bodyX - b.bodyX) < 0.5 && Math.abs(a.bodyY - b.bodyY) < 0.5 && Math.abs(a.bodyW - b.bodyW) < 0.5 && Math.abs(a.bodyH - b.bodyH) < 0.5 && Math.abs(a.slideX - b.slideX) < 0.5 && Math.abs(a.slideY - b.slideY) < 0.5;
}
function setDockState(screenName, state) {
if (!screenName || !state)
return false;
const normalized = _normalizeDockState(state);
if (_sameDockState(dockStates[screenName], normalized))
return true;
const next = _cloneDict(dockStates);
next[screenName] = _normalizeDockState(state);
next[screenName] = normalized;
dockStates = next;
return true;
}
@@ -191,10 +201,15 @@ Singleton {
function setDockSlide(screenName, x, y) {
if (!screenName)
return false;
const numX = Number(x);
const numY = Number(y);
const cur = dockSlides[screenName];
if (cur && Math.abs(cur.x - numX) < 0.5 && Math.abs(cur.y - numY) < 0.5)
return true;
const next = _cloneDict(dockSlides);
next[screenName] = {
"x": Number(x),
"y": Number(y)
"x": numX,
"y": numY
};
dockSlides = next;
return true;

View File

@@ -1,3 +1,5 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Wayland
@@ -94,22 +96,11 @@ Item {
signal dialogClosed
signal backgroundClicked
// Coalesce per-channel dirty bits; one ConnectedModeState write per tick.
Timer {
id: _fullSyncTimer
id: _syncTimer
interval: 0
onTriggered: root._flushFullSync()
}
Timer {
id: _animSyncTimer
interval: 0
onTriggered: root._flushAnimSync()
}
Timer {
id: _bodySyncTimer
interval: 0
onTriggered: root._flushBodySync()
onTriggered: root._flushSync()
}
property bool animationsEnabled: true
@@ -157,40 +148,37 @@ Item {
ConnectedModeState.releaseDockRetract(_chromeClaimId);
}
function _flushFullSync() {
_fullSyncPending = false;
_syncModalChromeState();
}
property bool _animSyncQueued: false
property bool _bodySyncQueued: false
function _queueFullSync() {
if (_fullSyncPending)
return;
_fullSyncPending = true;
_fullSyncTimer.restart();
if (!_syncTimer.running)
_syncTimer.restart();
}
property bool _animSyncQueued: false
function _queueAnimSync() {
if (_animSyncQueued)
return;
_animSyncQueued = true;
_animSyncTimer.restart();
if (!_syncTimer.running)
_syncTimer.restart();
}
function _flushAnimSync() {
_animSyncQueued = false;
_syncModalAnim();
}
property bool _bodySyncQueued: false
function _queueBodySync() {
if (_bodySyncQueued)
return;
_bodySyncQueued = true;
_bodySyncTimer.restart();
if (!_syncTimer.running)
_syncTimer.restart();
}
function _flushBodySync() {
function _flushSync() {
const fullDirty = _fullSyncPending;
const animDirty = _animSyncQueued;
const bodyDirty = _bodySyncQueued;
_fullSyncPending = false;
_animSyncQueued = false;
_bodySyncQueued = false;
_syncModalBody();
if (fullDirty)
_syncModalChromeState();
if (animDirty)
_syncModalAnim();
if (bodyDirty)
_syncModalBody();
}
function _syncModalAnim() {
@@ -699,44 +687,31 @@ Item {
return root.animationOffset;
}
property real animX: root.shouldBeVisible ? 0 : root.frozenMotionOffsetX
property real animY: root.shouldBeVisible ? 0 : root.frozenMotionOffsetY
readonly property real computedScaleCollapsed: root.animationScaleCollapsed
// openProgress: 0 = closed (at frozenMotionOffset, scaleCollapsed), 1 = open (at 0, scale 1).
QtObject {
id: morph
property real openProgress: root.shouldBeVisible ? 1 : 0
Behavior on openProgress {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
}
readonly property real animX: root.frozenMotionOffsetX * (1 - morph.openProgress)
readonly property real animY: root.frozenMotionOffsetY * (1 - morph.openProgress)
readonly property real scaleValue: computedScaleCollapsed + (1.0 - computedScaleCollapsed) * morph.openProgress
onAnimXChanged: if (root.frameOwnsConnectedChrome)
root._queueAnimSync()
onAnimYChanged: if (root.frameOwnsConnectedChrome)
root._queueAnimSync()
readonly property real computedScaleCollapsed: root.animationScaleCollapsed
property real scaleValue: root.shouldBeVisible ? 1.0 : computedScaleCollapsed
Behavior on animX {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
Behavior on animY {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
Behavior on scaleValue {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
Item {
id: contentContainer
anchors.centerIn: parent

View File

@@ -1,3 +1,5 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Wayland
@@ -349,45 +351,22 @@ Item {
readonly property real offsetX: slide ? 15 : 0
readonly property real offsetY: slide ? -30 : root.animationOffset
property real animX: 0
property real animY: 0
property real scaleValue: root.animationScaleCollapsed
onOffsetXChanged: animX = Theme.snap(root.shouldBeVisible ? 0 : offsetX, root.dpr)
onOffsetYChanged: animY = Theme.snap(root.shouldBeVisible ? 0 : offsetY, root.dpr)
Connections {
target: root
function onShouldBeVisibleChanged() {
modalContainer.animX = Theme.snap(root.shouldBeVisible ? 0 : modalContainer.offsetX, root.dpr);
modalContainer.animY = Theme.snap(root.shouldBeVisible ? 0 : modalContainer.offsetY, root.dpr);
modalContainer.scaleValue = root.shouldBeVisible ? 1.0 : root.animationScaleCollapsed;
// openProgress: 0 = closed (at offset, scaleCollapsed), 1 = open (at 0, scale 1).
QtObject {
id: morph
property real openProgress: root.shouldBeVisible ? 1 : 0
Behavior on openProgress {
enabled: root.animationsEnabled
DankAnim {
duration: root.animationDuration
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
}
Behavior on animX {
enabled: root.animationsEnabled
DankAnim {
duration: root.animationDuration
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
Behavior on animY {
enabled: root.animationsEnabled
DankAnim {
duration: root.animationDuration
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
Behavior on scaleValue {
enabled: root.animationsEnabled
DankAnim {
duration: root.animationDuration
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
readonly property real animX: modalContainer.offsetX * (1 - morph.openProgress)
readonly property real animY: modalContainer.offsetY * (1 - morph.openProgress)
readonly property real scaleValue: root.animationScaleCollapsed + (1.0 - root.animationScaleCollapsed) * morph.openProgress
Item {
id: contentContainer

View File

@@ -1,3 +1,5 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Wayland
@@ -215,22 +217,11 @@ Item {
signal dialogClosed
// Coalesce per-channel dirty bits; one ConnectedModeState write per tick.
Timer {
id: _fullSyncTimer
id: _syncTimer
interval: 0
onTriggered: root._flushFullSync()
}
Timer {
id: _animSyncTimer
interval: 0
onTriggered: root._flushAnimSync()
}
Timer {
id: _bodySyncTimer
interval: 0
onTriggered: root._flushBodySync()
onTriggered: root._flushSync()
}
property string _chromeClaimId: ""
@@ -276,40 +267,37 @@ Item {
ConnectedModeState.releaseDockRetract(_chromeClaimId);
}
function _flushFullSync() {
_fullSyncPending = false;
_syncModalChromeState();
}
property bool _animSyncQueued: false
property bool _bodySyncQueued: false
function _queueFullSync() {
if (_fullSyncPending)
return;
_fullSyncPending = true;
_fullSyncTimer.restart();
if (!_syncTimer.running)
_syncTimer.restart();
}
property bool _animSyncQueued: false
function _queueAnimSync() {
if (_animSyncQueued)
return;
_animSyncQueued = true;
_animSyncTimer.restart();
if (!_syncTimer.running)
_syncTimer.restart();
}
function _flushAnimSync() {
_animSyncQueued = false;
_syncModalAnim();
}
property bool _bodySyncQueued: false
function _queueBodySync() {
if (_bodySyncQueued)
return;
_bodySyncQueued = true;
_bodySyncTimer.restart();
if (!_syncTimer.running)
_syncTimer.restart();
}
function _flushBodySync() {
function _flushSync() {
const fullDirty = _fullSyncPending;
const animDirty = _animSyncQueued;
const bodyDirty = _bodySyncQueued;
_fullSyncPending = false;
_animSyncQueued = false;
_bodySyncQueued = false;
_syncModalBody();
if (fullDirty)
_syncModalChromeState();
if (animDirty)
_syncModalAnim();
if (bodyDirty)
_syncModalBody();
}
function _syncModalAnim() {
@@ -791,40 +779,28 @@ Item {
return -Math.max((root.shadowPad || 0) + Theme.effectAnimOffset, 40);
}
// Declarative bindings — snap applied at render layer (contentWrapper x/y)
property real animX: root._motionActive ? 0 : root._frozenMotionX
property real animY: root._motionActive ? 0 : root._frozenMotionY
property real scaleValue: root._motionActive ? 1.0 : Theme.effectScaleCollapsed
// openProgress: 0 = closed (at frozenMotion, scaleCollapsed), 1 = open (at 0, scale 1).
QtObject {
id: morph
property real openProgress: root._motionActive ? 1 : 0
Behavior on openProgress {
enabled: root.animationsEnabled
DankAnim {
duration: Theme.variantDuration(root.launcherAnimationDuration, root._motionActive)
easing.bezierCurve: root._motionActive ? root.launcherEnterCurve : root.launcherExitCurve
}
}
}
readonly property real animX: root._frozenMotionX * (1 - morph.openProgress)
readonly property real animY: root._frozenMotionY * (1 - morph.openProgress)
readonly property real scaleValue: Theme.effectScaleCollapsed + (1.0 - Theme.effectScaleCollapsed) * morph.openProgress
onAnimXChanged: if (root.frameOwnsConnectedChrome)
root._queueAnimSync()
onAnimYChanged: if (root.frameOwnsConnectedChrome)
root._queueAnimSync()
Behavior on animX {
enabled: root.animationsEnabled
DankAnim {
duration: Theme.variantDuration(root.launcherAnimationDuration, root._motionActive)
easing.bezierCurve: root._motionActive ? root.launcherEnterCurve : root.launcherExitCurve
}
}
Behavior on animY {
enabled: root.animationsEnabled
DankAnim {
duration: Theme.variantDuration(root.launcherAnimationDuration, root._motionActive)
easing.bezierCurve: root._motionActive ? root.launcherEnterCurve : root.launcherExitCurve
}
}
Behavior on scaleValue {
enabled: root.animationsEnabled
DankAnim {
duration: Theme.variantDuration(root.launcherAnimationDuration, root._motionActive)
easing.bezierCurve: root._motionActive ? root.launcherEnterCurve : root.launcherExitCurve
}
}
Item {
id: directionalClipMask
readonly property bool shouldClip: Theme.isDirectionalEffect

View File

@@ -63,16 +63,47 @@ PanelWindow {
return "right";
}
readonly property real _ccr: Theme.connectedCornerRadius
readonly property bool _popoutHorizontal: ConnectedModeState.popoutBarSide === "top" || ConnectedModeState.popoutBarSide === "bottom"
readonly property bool _notifHorizontal: ConnectorGeometry.isHorizontal(win._notifState.barSide)
readonly property bool _modalHorizontal: ConnectorGeometry.isHorizontal(win._modalState.barSide)
readonly property bool _dockHorizontal: ConnectorGeometry.isHorizontal(win._dockState.barSide)
readonly property real _popoutArcExtent: win._popoutHorizontal ? _popoutBodyBlurAnchor.height : _popoutBodyBlurAnchor.width
readonly property real _modalArcExtent: win._modalHorizontal ? _modalBodyBlurAnchor.height : _modalBodyBlurAnchor.width
readonly property real _popoutConnectorRadiusLeft: win._effectivePopoutStartCcr
readonly property real _popoutConnectorRadiusRight: win._effectivePopoutEndCcr
readonly property real _modalConnectorRadiusLeft: win._effectiveModalStartCcr
readonly property real _modalConnectorRadiusRight: win._effectiveModalEndCcr
readonly property real _notifConnectorRadiusLeft: win._effectiveNotifStartCcr
readonly property real _notifConnectorRadiusRight: win._effectiveNotifEndCcr
readonly property real _dockBodyBlurRadiusValue: _dockBodyBlurAnchor._active ? Math.max(0, Math.min(win._surfaceRadius, _dockBodyBlurAnchor.width / 2, _dockBodyBlurAnchor.height / 2)) : win._surfaceRadius
readonly property real _dockConnectorRadiusValue: {
if (!_dockBodyBlurAnchor._active)
return win._ccr;
const thickness = (win._dockState.barSide === "left" || win._dockState.barSide === "right") ? _dockBodyBlurAnchor.width : _dockBodyBlurAnchor.height;
const bodyRadius = win._dockBodyBlurRadiusValue;
const maxConnectorRadius = Math.max(0, thickness - bodyRadius - win._seamOverlap);
return Math.max(0, Math.min(win._ccr, bodyRadius, maxConnectorRadius));
}
readonly property real _popoutFillOverlapXValue: win._popoutHorizontal ? win._seamOverlap : 0
readonly property real _popoutFillOverlapYValue: (ConnectedModeState.popoutBarSide === "left" || ConnectedModeState.popoutBarSide === "right") ? win._seamOverlap : 0
readonly property real _dockFillOverlapXValue: win._dockHorizontal ? win._seamOverlap : 0
readonly property real _dockFillOverlapYValue: (win._dockState.barSide === "left" || win._dockState.barSide === "right") ? win._seamOverlap : 0
readonly property real _notifSideUnderlapValue: ConnectorGeometry.isVertical(win._notifState.barSide) ? win._seamOverlap : 0
readonly property real _notifStartUnderlapValue: win._notifState.omitStartConnector ? win._seamOverlap : 0
readonly property real _notifEndUnderlapValue: win._notifState.omitEndConnector ? win._seamOverlap : 0
// Theme.snap rounds to integer pixel: equal rounded values suppress
// downstream Changed during sub-pixel morph jitter.
readonly property real _effectivePopoutCcr: {
const extent = win._popoutArcExtent();
const isHoriz = ConnectedModeState.popoutBarSide === "top" || ConnectedModeState.popoutBarSide === "bottom";
const crossSize = isHoriz ? _popoutBodyBlurAnchor.width : _popoutBodyBlurAnchor.height;
return Math.max(0, Math.min(win._ccr, extent, crossSize / 2));
const crossSize = win._popoutHorizontal ? _popoutBodyBlurAnchor.width : _popoutBodyBlurAnchor.height;
return Theme.snap(Math.max(0, Math.min(win._ccr, win._popoutArcExtent, crossSize / 2)), win._dpr);
}
readonly property real _effectivePopoutFarCcr: {
const isHoriz = ConnectedModeState.popoutBarSide === "top" || ConnectedModeState.popoutBarSide === "bottom";
const crossSize = isHoriz ? _popoutBodyBlurAnchor.width : _popoutBodyBlurAnchor.height;
return Math.max(0, Math.min(win._ccr, win._surfaceRadius, crossSize / 2));
const crossSize = win._popoutHorizontal ? _popoutBodyBlurAnchor.width : _popoutBodyBlurAnchor.height;
return Theme.snap(Math.max(0, Math.min(win._ccr, win._surfaceRadius, crossSize / 2)), win._dpr);
}
readonly property real _effectivePopoutStartCcr: ConnectedModeState.popoutOmitStartConnector ? 0 : win._effectivePopoutCcr
readonly property real _effectivePopoutEndCcr: ConnectedModeState.popoutOmitEndConnector ? 0 : win._effectivePopoutCcr
@@ -81,14 +112,12 @@ PanelWindow {
readonly property real _effectivePopoutMaxCcr: Math.max(win._effectivePopoutStartCcr, win._effectivePopoutEndCcr)
readonly property real _effectivePopoutFarExtent: Math.max(win._effectivePopoutFarStartCcr, win._effectivePopoutFarEndCcr)
readonly property real _effectiveNotifCcr: {
const isHoriz = ConnectorGeometry.isHorizontal(win._notifState.barSide);
const crossSize = isHoriz ? _notifBodyBlurAnchor.width : _notifBodyBlurAnchor.height;
const extent = isHoriz ? _notifBodyBlurAnchor.height : _notifBodyBlurAnchor.width;
const crossSize = win._notifHorizontal ? _notifBodyBlurAnchor.width : _notifBodyBlurAnchor.height;
const extent = win._notifHorizontal ? _notifBodyBlurAnchor.height : _notifBodyBlurAnchor.width;
return Theme.snap(Math.max(0, Math.min(win._ccr, win._surfaceRadius, extent, crossSize / 2)), win._dpr);
}
readonly property real _effectiveNotifFarCcr: {
const isHoriz = ConnectorGeometry.isHorizontal(win._notifState.barSide);
const crossSize = isHoriz ? _notifBodySceneBlurAnchor.width : _notifBodySceneBlurAnchor.height;
const crossSize = win._notifHorizontal ? _notifBodySceneBlurAnchor.width : _notifBodySceneBlurAnchor.height;
return Theme.snap(Math.max(0, Math.min(win._ccr, win._surfaceRadius, crossSize / 2)), win._dpr);
}
readonly property real _effectiveNotifStartCcr: win._notifState.omitStartConnector ? 0 : win._effectiveNotifCcr
@@ -98,14 +127,12 @@ PanelWindow {
readonly property real _effectiveNotifMaxCcr: Math.max(win._effectiveNotifStartCcr, win._effectiveNotifEndCcr)
readonly property real _effectiveNotifFarExtent: Math.max(win._effectiveNotifFarStartCcr, win._effectiveNotifFarEndCcr)
readonly property real _effectiveModalCcr: {
const isHoriz = ConnectorGeometry.isHorizontal(win._modalState.barSide);
const crossSize = isHoriz ? _modalBodyBlurAnchor.width : _modalBodyBlurAnchor.height;
const extent = isHoriz ? _modalBodyBlurAnchor.height : _modalBodyBlurAnchor.width;
const crossSize = win._modalHorizontal ? _modalBodyBlurAnchor.width : _modalBodyBlurAnchor.height;
const extent = win._modalHorizontal ? _modalBodyBlurAnchor.height : _modalBodyBlurAnchor.width;
return Theme.snap(Math.max(0, Math.min(win._ccr, win._surfaceRadius, extent, crossSize / 2)), win._dpr);
}
readonly property real _effectiveModalFarCcr: {
const isHoriz = ConnectorGeometry.isHorizontal(win._modalState.barSide);
const crossSize = isHoriz ? _modalBodyBlurAnchor.width : _modalBodyBlurAnchor.height;
const crossSize = win._modalHorizontal ? _modalBodyBlurAnchor.width : _modalBodyBlurAnchor.height;
return Theme.snap(Math.max(0, Math.min(win._ccr, win._surfaceRadius, crossSize / 2)), win._dpr);
}
readonly property real _effectiveModalStartCcr: win._modalState.omitStartConnector ? 0 : win._effectiveModalCcr
@@ -205,8 +232,8 @@ PanelWindow {
readonly property string _side: win._dockState.barSide
readonly property bool _active: _dockBodyBlurAnchor._active && _dockBodyBlurAnchor.width > 0 && _dockBodyBlurAnchor.height > 0
readonly property real _capWidth: (_side === "left" || _side === "right") ? Math.min(win._dockConnectorRadius(), _dockBodyBlurAnchor.width) : _dockBodyBlurAnchor.width
readonly property real _capHeight: (_side === "top" || _side === "bottom") ? Math.min(win._dockConnectorRadius(), _dockBodyBlurAnchor.height) : _dockBodyBlurAnchor.height
readonly property real _capWidth: (_side === "left" || _side === "right") ? Math.min(win._dockConnectorRadiusValue, _dockBodyBlurAnchor.width) : _dockBodyBlurAnchor.width
readonly property real _capHeight: (_side === "top" || _side === "bottom") ? Math.min(win._dockConnectorRadiusValue, _dockBodyBlurAnchor.height) : _dockBodyBlurAnchor.height
x: !_active ? 0 : (_side === "right" ? _dockBodyBlurAnchor.x + _dockBodyBlurAnchor.width - _capWidth : _dockBodyBlurAnchor.x)
y: !_active ? 0 : (_side === "bottom" ? _dockBodyBlurAnchor.y + _dockBodyBlurAnchor.height - _capHeight : _dockBodyBlurAnchor.y)
@@ -218,13 +245,13 @@ PanelWindow {
id: _popoutLeftConnectorBlurAnchor
opacity: 0
readonly property real _radius: win._popoutConnectorRadius("left")
readonly property real _radius: win._popoutConnectorRadiusLeft
readonly property bool _active: _popoutBodyBlurAnchor._active && _radius > 0
readonly property real _w: ConnectorGeometry.connectorWidth(ConnectedModeState.popoutBarSide, 0, win._popoutConnectorRadius("left"))
readonly property real _h: ConnectorGeometry.connectorHeight(ConnectedModeState.popoutBarSide, 0, win._popoutConnectorRadius("left"))
readonly property real _w: ConnectorGeometry.connectorWidth(ConnectedModeState.popoutBarSide, 0, win._popoutConnectorRadiusLeft)
readonly property real _h: ConnectorGeometry.connectorHeight(ConnectedModeState.popoutBarSide, 0, win._popoutConnectorRadiusLeft)
x: _active ? Theme.snap(ConnectorGeometry.connectorX(ConnectedModeState.popoutBarSide, _popoutBodyBlurAnchor.x, _popoutBodyBlurAnchor.width, "left", 0, win._popoutConnectorRadius("left")), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(ConnectedModeState.popoutBarSide, _popoutBodyBlurAnchor.y, _popoutBodyBlurAnchor.height, "left", 0, win._popoutConnectorRadius("left")), win._dpr) : 0
x: _active ? Theme.snap(ConnectorGeometry.connectorX(ConnectedModeState.popoutBarSide, _popoutBodyBlurAnchor.x, _popoutBodyBlurAnchor.width, "left", 0, win._popoutConnectorRadiusLeft), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(ConnectedModeState.popoutBarSide, _popoutBodyBlurAnchor.y, _popoutBodyBlurAnchor.height, "left", 0, win._popoutConnectorRadiusLeft), win._dpr) : 0
width: _active ? _w : 0
height: _active ? _h : 0
}
@@ -233,13 +260,13 @@ PanelWindow {
id: _popoutRightConnectorBlurAnchor
opacity: 0
readonly property real _radius: win._popoutConnectorRadius("right")
readonly property real _radius: win._popoutConnectorRadiusRight
readonly property bool _active: _popoutBodyBlurAnchor._active && _radius > 0
readonly property real _w: ConnectorGeometry.connectorWidth(ConnectedModeState.popoutBarSide, 0, win._popoutConnectorRadius("right"))
readonly property real _h: ConnectorGeometry.connectorHeight(ConnectedModeState.popoutBarSide, 0, win._popoutConnectorRadius("right"))
readonly property real _w: ConnectorGeometry.connectorWidth(ConnectedModeState.popoutBarSide, 0, win._popoutConnectorRadiusRight)
readonly property real _h: ConnectorGeometry.connectorHeight(ConnectedModeState.popoutBarSide, 0, win._popoutConnectorRadiusRight)
x: _active ? Theme.snap(ConnectorGeometry.connectorX(ConnectedModeState.popoutBarSide, _popoutBodyBlurAnchor.x, _popoutBodyBlurAnchor.width, "right", 0, win._popoutConnectorRadius("right")), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(ConnectedModeState.popoutBarSide, _popoutBodyBlurAnchor.y, _popoutBodyBlurAnchor.height, "right", 0, win._popoutConnectorRadius("right")), win._dpr) : 0
x: _active ? Theme.snap(ConnectorGeometry.connectorX(ConnectedModeState.popoutBarSide, _popoutBodyBlurAnchor.x, _popoutBodyBlurAnchor.width, "right", 0, win._popoutConnectorRadiusRight), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(ConnectedModeState.popoutBarSide, _popoutBodyBlurAnchor.y, _popoutBodyBlurAnchor.height, "right", 0, win._popoutConnectorRadiusRight), win._dpr) : 0
width: _active ? _w : 0
height: _active ? _h : 0
}
@@ -250,7 +277,7 @@ PanelWindow {
readonly property bool _active: _popoutLeftConnectorBlurAnchor.width > 0 && _popoutLeftConnectorBlurAnchor.height > 0
readonly property string _arcCorner: ConnectorGeometry.arcCorner(ConnectedModeState.popoutBarSide, "left")
readonly property real _radius: win._popoutConnectorRadius("left")
readonly property real _radius: win._popoutConnectorRadiusLeft
x: _active ? win._connectorCutoutX(_popoutLeftConnectorBlurAnchor.x, _popoutLeftConnectorBlurAnchor.width, _arcCorner, _radius) : 0
y: _active ? win._connectorCutoutY(_popoutLeftConnectorBlurAnchor.y, _popoutLeftConnectorBlurAnchor.height, _arcCorner, _radius) : 0
@@ -264,7 +291,7 @@ PanelWindow {
readonly property bool _active: _popoutRightConnectorBlurAnchor.width > 0 && _popoutRightConnectorBlurAnchor.height > 0
readonly property string _arcCorner: ConnectorGeometry.arcCorner(ConnectedModeState.popoutBarSide, "right")
readonly property real _radius: win._popoutConnectorRadius("right")
readonly property real _radius: win._popoutConnectorRadiusRight
x: _active ? win._connectorCutoutX(_popoutRightConnectorBlurAnchor.x, _popoutRightConnectorBlurAnchor.width, _arcCorner, _radius) : 0
y: _active ? win._connectorCutoutY(_popoutRightConnectorBlurAnchor.y, _popoutRightConnectorBlurAnchor.height, _arcCorner, _radius) : 0
@@ -360,12 +387,12 @@ PanelWindow {
id: _dockLeftConnectorBlurAnchor
opacity: 0
readonly property bool _active: _dockBodyBlurAnchor._active && win._dockConnectorRadius() > 0
readonly property real _w: ConnectorGeometry.connectorWidth(win._dockState.barSide, 0, win._dockConnectorRadius())
readonly property real _h: ConnectorGeometry.connectorHeight(win._dockState.barSide, 0, win._dockConnectorRadius())
readonly property bool _active: _dockBodyBlurAnchor._active && win._dockConnectorRadiusValue > 0
readonly property real _w: ConnectorGeometry.connectorWidth(win._dockState.barSide, 0, win._dockConnectorRadiusValue)
readonly property real _h: ConnectorGeometry.connectorHeight(win._dockState.barSide, 0, win._dockConnectorRadiusValue)
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._dockState.barSide, _dockBodyBlurAnchor.x, _dockBodyBlurAnchor.width, "left", 0, win._dockConnectorRadius()), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._dockState.barSide, _dockBodyBlurAnchor.y, _dockBodyBlurAnchor.height, "left", 0, win._dockConnectorRadius()), win._dpr) : 0
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._dockState.barSide, _dockBodyBlurAnchor.x, _dockBodyBlurAnchor.width, "left", 0, win._dockConnectorRadiusValue), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._dockState.barSide, _dockBodyBlurAnchor.y, _dockBodyBlurAnchor.height, "left", 0, win._dockConnectorRadiusValue), win._dpr) : 0
width: _active ? _w : 0
height: _active ? _h : 0
}
@@ -374,12 +401,12 @@ PanelWindow {
id: _dockRightConnectorBlurAnchor
opacity: 0
readonly property bool _active: _dockBodyBlurAnchor._active && win._dockConnectorRadius() > 0
readonly property real _w: ConnectorGeometry.connectorWidth(win._dockState.barSide, 0, win._dockConnectorRadius())
readonly property real _h: ConnectorGeometry.connectorHeight(win._dockState.barSide, 0, win._dockConnectorRadius())
readonly property bool _active: _dockBodyBlurAnchor._active && win._dockConnectorRadiusValue > 0
readonly property real _w: ConnectorGeometry.connectorWidth(win._dockState.barSide, 0, win._dockConnectorRadiusValue)
readonly property real _h: ConnectorGeometry.connectorHeight(win._dockState.barSide, 0, win._dockConnectorRadiusValue)
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._dockState.barSide, _dockBodyBlurAnchor.x, _dockBodyBlurAnchor.width, "right", 0, win._dockConnectorRadius()), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._dockState.barSide, _dockBodyBlurAnchor.y, _dockBodyBlurAnchor.height, "right", 0, win._dockConnectorRadius()), win._dpr) : 0
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._dockState.barSide, _dockBodyBlurAnchor.x, _dockBodyBlurAnchor.width, "right", 0, win._dockConnectorRadiusValue), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._dockState.barSide, _dockBodyBlurAnchor.y, _dockBodyBlurAnchor.height, "right", 0, win._dockConnectorRadiusValue), win._dpr) : 0
width: _active ? _w : 0
height: _active ? _h : 0
}
@@ -391,10 +418,10 @@ PanelWindow {
readonly property bool _active: _dockLeftConnectorBlurAnchor.width > 0 && _dockLeftConnectorBlurAnchor.height > 0
readonly property string _arcCorner: ConnectorGeometry.arcCorner(win._dockState.barSide, "left")
x: _active ? win._connectorCutoutX(_dockLeftConnectorBlurAnchor.x, _dockLeftConnectorBlurAnchor.width, _arcCorner, win._dockConnectorRadius()) : 0
y: _active ? win._connectorCutoutY(_dockLeftConnectorBlurAnchor.y, _dockLeftConnectorBlurAnchor.height, _arcCorner, win._dockConnectorRadius()) : 0
width: _active ? win._dockConnectorRadius() * 2 : 0
height: _active ? win._dockConnectorRadius() * 2 : 0
x: _active ? win._connectorCutoutX(_dockLeftConnectorBlurAnchor.x, _dockLeftConnectorBlurAnchor.width, _arcCorner, win._dockConnectorRadiusValue) : 0
y: _active ? win._connectorCutoutY(_dockLeftConnectorBlurAnchor.y, _dockLeftConnectorBlurAnchor.height, _arcCorner, win._dockConnectorRadiusValue) : 0
width: _active ? win._dockConnectorRadiusValue * 2 : 0
height: _active ? win._dockConnectorRadiusValue * 2 : 0
}
Item {
@@ -404,10 +431,10 @@ PanelWindow {
readonly property bool _active: _dockRightConnectorBlurAnchor.width > 0 && _dockRightConnectorBlurAnchor.height > 0
readonly property string _arcCorner: ConnectorGeometry.arcCorner(win._dockState.barSide, "right")
x: _active ? win._connectorCutoutX(_dockRightConnectorBlurAnchor.x, _dockRightConnectorBlurAnchor.width, _arcCorner, win._dockConnectorRadius()) : 0
y: _active ? win._connectorCutoutY(_dockRightConnectorBlurAnchor.y, _dockRightConnectorBlurAnchor.height, _arcCorner, win._dockConnectorRadius()) : 0
width: _active ? win._dockConnectorRadius() * 2 : 0
height: _active ? win._dockConnectorRadius() * 2 : 0
x: _active ? win._connectorCutoutX(_dockRightConnectorBlurAnchor.x, _dockRightConnectorBlurAnchor.width, _arcCorner, win._dockConnectorRadiusValue) : 0
y: _active ? win._connectorCutoutY(_dockRightConnectorBlurAnchor.y, _dockRightConnectorBlurAnchor.height, _arcCorner, win._dockConnectorRadiusValue) : 0
width: _active ? win._dockConnectorRadiusValue * 2 : 0
height: _active ? win._dockConnectorRadiusValue * 2 : 0
}
Item {
@@ -458,13 +485,13 @@ PanelWindow {
id: _modalLeftConnectorBlurAnchor
opacity: 0
readonly property real _radius: win._modalConnectorRadius("left")
readonly property real _radius: win._modalConnectorRadiusLeft
readonly property bool _active: _modalBodyBlurAnchor._active && _radius > 0
readonly property real _w: ConnectorGeometry.connectorWidth(win._modalState.barSide, 0, win._modalConnectorRadius("left"))
readonly property real _h: ConnectorGeometry.connectorHeight(win._modalState.barSide, 0, win._modalConnectorRadius("left"))
readonly property real _w: ConnectorGeometry.connectorWidth(win._modalState.barSide, 0, win._modalConnectorRadiusLeft)
readonly property real _h: ConnectorGeometry.connectorHeight(win._modalState.barSide, 0, win._modalConnectorRadiusLeft)
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._modalState.barSide, _modalBodyBlurAnchor.x, _modalBodyBlurAnchor.width, "left", 0, win._modalConnectorRadius("left")), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._modalState.barSide, _modalBodyBlurAnchor.y, _modalBodyBlurAnchor.height, "left", 0, win._modalConnectorRadius("left")), win._dpr) : 0
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._modalState.barSide, _modalBodyBlurAnchor.x, _modalBodyBlurAnchor.width, "left", 0, win._modalConnectorRadiusLeft), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._modalState.barSide, _modalBodyBlurAnchor.y, _modalBodyBlurAnchor.height, "left", 0, win._modalConnectorRadiusLeft), win._dpr) : 0
width: _active ? _w : 0
height: _active ? _h : 0
}
@@ -473,13 +500,13 @@ PanelWindow {
id: _modalRightConnectorBlurAnchor
opacity: 0
readonly property real _radius: win._modalConnectorRadius("right")
readonly property real _radius: win._modalConnectorRadiusRight
readonly property bool _active: _modalBodyBlurAnchor._active && _radius > 0
readonly property real _w: ConnectorGeometry.connectorWidth(win._modalState.barSide, 0, win._modalConnectorRadius("right"))
readonly property real _h: ConnectorGeometry.connectorHeight(win._modalState.barSide, 0, win._modalConnectorRadius("right"))
readonly property real _w: ConnectorGeometry.connectorWidth(win._modalState.barSide, 0, win._modalConnectorRadiusRight)
readonly property real _h: ConnectorGeometry.connectorHeight(win._modalState.barSide, 0, win._modalConnectorRadiusRight)
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._modalState.barSide, _modalBodyBlurAnchor.x, _modalBodyBlurAnchor.width, "right", 0, win._modalConnectorRadius("right")), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._modalState.barSide, _modalBodyBlurAnchor.y, _modalBodyBlurAnchor.height, "right", 0, win._modalConnectorRadius("right")), win._dpr) : 0
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._modalState.barSide, _modalBodyBlurAnchor.x, _modalBodyBlurAnchor.width, "right", 0, win._modalConnectorRadiusRight), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._modalState.barSide, _modalBodyBlurAnchor.y, _modalBodyBlurAnchor.height, "right", 0, win._modalConnectorRadiusRight), win._dpr) : 0
width: _active ? _w : 0
height: _active ? _h : 0
}
@@ -490,7 +517,7 @@ PanelWindow {
readonly property bool _active: _modalLeftConnectorBlurAnchor.width > 0 && _modalLeftConnectorBlurAnchor.height > 0
readonly property string _arcCorner: ConnectorGeometry.arcCorner(win._modalState.barSide, "left")
readonly property real _radius: win._modalConnectorRadius("left")
readonly property real _radius: win._modalConnectorRadiusLeft
x: _active ? win._connectorCutoutX(_modalLeftConnectorBlurAnchor.x, _modalLeftConnectorBlurAnchor.width, _arcCorner, _radius) : 0
y: _active ? win._connectorCutoutY(_modalLeftConnectorBlurAnchor.y, _modalLeftConnectorBlurAnchor.height, _arcCorner, _radius) : 0
@@ -504,7 +531,7 @@ PanelWindow {
readonly property bool _active: _modalRightConnectorBlurAnchor.width > 0 && _modalRightConnectorBlurAnchor.height > 0
readonly property string _arcCorner: ConnectorGeometry.arcCorner(win._modalState.barSide, "right")
readonly property real _radius: win._modalConnectorRadius("right")
readonly property real _radius: win._modalConnectorRadiusRight
x: _active ? win._connectorCutoutX(_modalRightConnectorBlurAnchor.x, _modalRightConnectorBlurAnchor.width, _arcCorner, _radius) : 0
y: _active ? win._connectorCutoutY(_modalRightConnectorBlurAnchor.y, _modalRightConnectorBlurAnchor.height, _arcCorner, _radius) : 0
@@ -614,7 +641,7 @@ PanelWindow {
opacity: 0
readonly property string _side: win._notifState.barSide
readonly property real _capRadius: win._notifMaxConnectorRadius()
readonly property real _capRadius: win._effectiveNotifMaxCcr
readonly property bool _active: _notifBodySceneBlurAnchor._active && _notifBodySceneBlurAnchor.width > 0 && _notifBodySceneBlurAnchor.height > 0 && _capRadius > 0
readonly property real _capWidth: (_side === "left" || _side === "right") ? Math.min(_capRadius, _notifBodySceneBlurAnchor.width) : _notifBodySceneBlurAnchor.width
readonly property real _capHeight: (_side === "top" || _side === "bottom") ? Math.min(_capRadius, _notifBodySceneBlurAnchor.height) : _notifBodySceneBlurAnchor.height
@@ -629,13 +656,13 @@ PanelWindow {
id: _notifLeftConnectorBlurAnchor
opacity: 0
readonly property real _radius: win._notifConnectorRadius("left")
readonly property real _radius: win._notifConnectorRadiusLeft
readonly property bool _active: _notifBodySceneBlurAnchor._active && _radius > 0
readonly property real _w: ConnectorGeometry.connectorWidth(win._notifState.barSide, 0, win._notifConnectorRadius("left"))
readonly property real _h: ConnectorGeometry.connectorHeight(win._notifState.barSide, 0, win._notifConnectorRadius("left"))
readonly property real _w: ConnectorGeometry.connectorWidth(win._notifState.barSide, 0, win._notifConnectorRadiusLeft)
readonly property real _h: ConnectorGeometry.connectorHeight(win._notifState.barSide, 0, win._notifConnectorRadiusLeft)
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._notifState.barSide, _notifBodySceneBlurAnchor.x, _notifBodySceneBlurAnchor.width, "left", 0, win._notifConnectorRadius("left")), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._notifState.barSide, _notifBodySceneBlurAnchor.y, _notifBodySceneBlurAnchor.height, "left", 0, win._notifConnectorRadius("left")), win._dpr) : 0
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._notifState.barSide, _notifBodySceneBlurAnchor.x, _notifBodySceneBlurAnchor.width, "left", 0, win._notifConnectorRadiusLeft), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._notifState.barSide, _notifBodySceneBlurAnchor.y, _notifBodySceneBlurAnchor.height, "left", 0, win._notifConnectorRadiusLeft), win._dpr) : 0
width: _active ? _w : 0
height: _active ? _h : 0
}
@@ -644,13 +671,13 @@ PanelWindow {
id: _notifRightConnectorBlurAnchor
opacity: 0
readonly property real _radius: win._notifConnectorRadius("right")
readonly property real _radius: win._notifConnectorRadiusRight
readonly property bool _active: _notifBodySceneBlurAnchor._active && _radius > 0
readonly property real _w: ConnectorGeometry.connectorWidth(win._notifState.barSide, 0, win._notifConnectorRadius("right"))
readonly property real _h: ConnectorGeometry.connectorHeight(win._notifState.barSide, 0, win._notifConnectorRadius("right"))
readonly property real _w: ConnectorGeometry.connectorWidth(win._notifState.barSide, 0, win._notifConnectorRadiusRight)
readonly property real _h: ConnectorGeometry.connectorHeight(win._notifState.barSide, 0, win._notifConnectorRadiusRight)
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._notifState.barSide, _notifBodySceneBlurAnchor.x, _notifBodySceneBlurAnchor.width, "right", 0, win._notifConnectorRadius("right")), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._notifState.barSide, _notifBodySceneBlurAnchor.y, _notifBodySceneBlurAnchor.height, "right", 0, win._notifConnectorRadius("right")), win._dpr) : 0
x: _active ? Theme.snap(ConnectorGeometry.connectorX(win._notifState.barSide, _notifBodySceneBlurAnchor.x, _notifBodySceneBlurAnchor.width, "right", 0, win._notifConnectorRadiusRight), win._dpr) : 0
y: _active ? Theme.snap(ConnectorGeometry.connectorY(win._notifState.barSide, _notifBodySceneBlurAnchor.y, _notifBodySceneBlurAnchor.height, "right", 0, win._notifConnectorRadiusRight), win._dpr) : 0
width: _active ? _w : 0
height: _active ? _h : 0
}
@@ -661,7 +688,7 @@ PanelWindow {
readonly property bool _active: _notifLeftConnectorBlurAnchor.width > 0 && _notifLeftConnectorBlurAnchor.height > 0
readonly property string _arcCorner: ConnectorGeometry.arcCorner(win._notifState.barSide, "left")
readonly property real _radius: win._notifConnectorRadius("left")
readonly property real _radius: win._notifConnectorRadiusLeft
x: _active ? win._connectorCutoutX(_notifLeftConnectorBlurAnchor.x, _notifLeftConnectorBlurAnchor.width, _arcCorner, _radius) : 0
y: _active ? win._connectorCutoutY(_notifLeftConnectorBlurAnchor.y, _notifLeftConnectorBlurAnchor.height, _arcCorner, _radius) : 0
@@ -675,7 +702,7 @@ PanelWindow {
readonly property bool _active: _notifRightConnectorBlurAnchor.width > 0 && _notifRightConnectorBlurAnchor.height > 0
readonly property string _arcCorner: ConnectorGeometry.arcCorner(win._notifState.barSide, "right")
readonly property real _radius: win._notifConnectorRadius("right")
readonly property real _radius: win._notifConnectorRadiusRight
x: _active ? win._connectorCutoutX(_notifRightConnectorBlurAnchor.x, _notifRightConnectorBlurAnchor.width, _arcCorner, _radius) : 0
y: _active ? win._connectorCutoutY(_notifRightConnectorBlurAnchor.y, _notifRightConnectorBlurAnchor.height, _arcCorner, _radius) : 0
@@ -793,7 +820,7 @@ PanelWindow {
Region {
item: _popoutLeftConnectorCutout
intersection: Intersection.Subtract
radius: win._popoutConnectorRadius("left")
radius: win._popoutConnectorRadiusLeft
}
}
Region {
@@ -801,7 +828,7 @@ PanelWindow {
Region {
item: _popoutRightConnectorCutout
intersection: Intersection.Subtract
radius: win._popoutConnectorRadius("right")
radius: win._popoutConnectorRadiusRight
}
}
Region {
@@ -829,7 +856,7 @@ PanelWindow {
Region {
item: _dockBodyBlurAnchor
radius: win._dockBodyBlurRadius()
radius: win._dockBodyBlurRadiusValue
}
Region {
item: _dockBodyBlurCap
@@ -839,7 +866,7 @@ PanelWindow {
Region {
item: _dockLeftConnectorCutout
intersection: Intersection.Subtract
radius: win._dockConnectorRadius()
radius: win._dockConnectorRadiusValue
}
}
Region {
@@ -847,7 +874,7 @@ PanelWindow {
Region {
item: _dockRightConnectorCutout
intersection: Intersection.Subtract
radius: win._dockConnectorRadius()
radius: win._dockConnectorRadiusValue
}
}
@@ -863,7 +890,7 @@ PanelWindow {
Region {
item: _notifLeftConnectorCutout
intersection: Intersection.Subtract
radius: win._notifConnectorRadius("left")
radius: win._notifConnectorRadiusLeft
}
}
Region {
@@ -871,7 +898,7 @@ PanelWindow {
Region {
item: _notifRightConnectorCutout
intersection: Intersection.Subtract
radius: win._notifConnectorRadius("right")
radius: win._notifConnectorRadiusRight
}
}
Region {
@@ -909,7 +936,7 @@ PanelWindow {
Region {
item: _modalLeftConnectorCutout
intersection: Intersection.Subtract
radius: win._modalConnectorRadius("left")
radius: win._modalConnectorRadiusLeft
}
}
Region {
@@ -917,7 +944,7 @@ PanelWindow {
Region {
item: _modalRightConnectorCutout
intersection: Intersection.Subtract
radius: win._modalConnectorRadius("right")
radius: win._modalConnectorRadiusRight
}
}
Region {
@@ -944,39 +971,12 @@ PanelWindow {
}
}
function _dockBodyBlurRadius() {
return _dockBodyBlurAnchor._active ? Math.max(0, Math.min(win._surfaceRadius, _dockBodyBlurAnchor.width / 2, _dockBodyBlurAnchor.height / 2)) : win._surfaceRadius;
}
function _dockConnectorRadius() {
if (!_dockBodyBlurAnchor._active)
return win._ccr;
const dockSide = win._dockState.barSide;
const thickness = (dockSide === "left" || dockSide === "right") ? _dockBodyBlurAnchor.width : _dockBodyBlurAnchor.height;
const bodyRadius = win._dockBodyBlurRadius();
const maxConnectorRadius = Math.max(0, thickness - bodyRadius - win._seamOverlap);
return Math.max(0, Math.min(win._ccr, bodyRadius, maxConnectorRadius));
}
function _notifSideUnderlap() {
const side = win._notifState.barSide;
return ConnectorGeometry.isVertical(side) ? win._seamOverlap : 0;
}
function _notifStartUnderlap() {
return win._notifState.omitStartConnector ? win._seamOverlap : 0;
}
function _notifEndUnderlap() {
return win._notifState.omitEndConnector ? win._seamOverlap : 0;
}
// Notif body scene rect, accounting for start/end/side underlaps per bar orientation.
function _notifBodyScene() {
const isHoriz = ConnectorGeometry.isHorizontal(win._notifState.barSide);
const start = win._notifStartUnderlap();
const end = win._notifEndUnderlap();
const side = win._notifSideUnderlap();
const start = win._notifStartUnderlapValue;
const end = win._notifEndUnderlapValue;
const side = win._notifSideUnderlapValue;
if (isHoriz) {
return {
"x": _notifBodyBlurAnchor.x - start,
@@ -993,59 +993,19 @@ PanelWindow {
};
}
function _notifConnectorRadius(placement) {
return placement === "right" ? win._effectiveNotifEndCcr : win._effectiveNotifStartCcr;
}
function _notifMaxConnectorRadius() {
return win._effectiveNotifMaxCcr;
}
function _popoutConnectorRadius(placement) {
return placement === "right" ? win._effectivePopoutEndCcr : win._effectivePopoutStartCcr;
}
function _popoutFillOverlapX() {
return (ConnectedModeState.popoutBarSide === "top" || ConnectedModeState.popoutBarSide === "bottom") ? win._seamOverlap : 0;
}
function _popoutFillOverlapY() {
return (ConnectedModeState.popoutBarSide === "left" || ConnectedModeState.popoutBarSide === "right") ? win._seamOverlap : 0;
}
function _dockFillOverlapX() {
return ConnectorGeometry.isHorizontal(win._dockState.barSide) ? win._seamOverlap : 0;
}
function _dockFillOverlapY() {
return (win._dockState.barSide === "left" || win._dockState.barSide === "right") ? win._seamOverlap : 0;
}
function _modalArcExtent() {
return ConnectorGeometry.isHorizontal(win._modalState.barSide) ? _modalBodyBlurAnchor.height : _modalBodyBlurAnchor.width;
}
function _modalBlurCapThickness() {
const extent = win._modalArcExtent();
const extent = win._modalArcExtent;
return Math.max(0, Math.min(win._effectiveModalCcr, extent - win._surfaceRadius));
}
function _modalConnectorRadius(placement) {
return placement === "right" ? win._effectiveModalEndCcr : win._effectiveModalStartCcr;
}
function _popoutArcExtent() {
return (ConnectedModeState.popoutBarSide === "top" || ConnectedModeState.popoutBarSide === "bottom") ? _popoutBodyBlurAnchor.height : _popoutBodyBlurAnchor.width;
}
function _popoutArcVisible() {
if (!_popoutBodyBlurAnchor._active || _popoutBodyBlurAnchor.width <= 0 || _popoutBodyBlurAnchor.height <= 0)
return false;
return win._popoutArcExtent() >= win._ccr * (1 + win._ccr * 0.02);
return win._popoutArcExtent >= win._ccr * (1 + win._ccr * 0.02);
}
function _popoutBlurCapThickness() {
const extent = win._popoutArcExtent();
const extent = win._popoutArcExtent;
return Math.max(0, Math.min(win._effectivePopoutMaxCcr, extent - win._surfaceRadius));
}
@@ -1070,19 +1030,19 @@ PanelWindow {
}
function _popoutClipX() {
return _popoutBodyBlurAnchor.x - win._popoutChromeX() - win._popoutFillOverlapX();
return _popoutBodyBlurAnchor.x - win._popoutChromeX() - win._popoutFillOverlapXValue;
}
function _popoutClipY() {
return _popoutBodyBlurAnchor.y - win._popoutChromeY() - win._popoutFillOverlapY();
return _popoutBodyBlurAnchor.y - win._popoutChromeY() - win._popoutFillOverlapYValue;
}
function _popoutClipWidth() {
return _popoutBodyBlurAnchor.width + win._popoutFillOverlapX() * 2;
return _popoutBodyBlurAnchor.width + win._popoutFillOverlapXValue * 2;
}
function _popoutClipHeight() {
return _popoutBodyBlurAnchor.height + win._popoutFillOverlapY() * 2;
return _popoutBodyBlurAnchor.height + win._popoutFillOverlapYValue * 2;
}
function _popoutShapeBodyOffsetX() {
@@ -1114,47 +1074,47 @@ PanelWindow {
}
function _popoutBodyXInClip() {
return (ConnectedModeState.popoutBarSide === "left" ? _popoutBodyBlurAnchor._dxClamp : 0) - win._popoutFillOverlapX();
return (ConnectedModeState.popoutBarSide === "left" ? _popoutBodyBlurAnchor._dxClamp : 0) - win._popoutFillOverlapXValue;
}
function _popoutBodyYInClip() {
return (ConnectedModeState.popoutBarSide === "top" ? _popoutBodyBlurAnchor._dyClamp : 0) - win._popoutFillOverlapY();
return (ConnectedModeState.popoutBarSide === "top" ? _popoutBodyBlurAnchor._dyClamp : 0) - win._popoutFillOverlapYValue;
}
function _popoutBodyFullWidth() {
return ConnectedModeState.popoutBodyW + win._popoutFillOverlapX() * 2;
return ConnectedModeState.popoutBodyW + win._popoutFillOverlapXValue * 2;
}
function _popoutBodyFullHeight() {
return ConnectedModeState.popoutBodyH + win._popoutFillOverlapY() * 2;
return ConnectedModeState.popoutBodyH + win._popoutFillOverlapYValue * 2;
}
function _dockChromeX() {
const dockSide = win._dockState.barSide;
return _dockBodyBlurAnchor.x - ((dockSide === "top" || dockSide === "bottom") ? win._dockConnectorRadius() : 0);
return _dockBodyBlurAnchor.x - ((dockSide === "top" || dockSide === "bottom") ? win._dockConnectorRadiusValue : 0);
}
function _dockChromeY() {
const dockSide = win._dockState.barSide;
return _dockBodyBlurAnchor.y - ((dockSide === "left" || dockSide === "right") ? win._dockConnectorRadius() : 0);
return _dockBodyBlurAnchor.y - ((dockSide === "left" || dockSide === "right") ? win._dockConnectorRadiusValue : 0);
}
function _dockChromeWidth() {
const dockSide = win._dockState.barSide;
return _dockBodyBlurAnchor.width + ((dockSide === "top" || dockSide === "bottom") ? win._dockConnectorRadius() * 2 : 0);
return _dockBodyBlurAnchor.width + ((dockSide === "top" || dockSide === "bottom") ? win._dockConnectorRadiusValue * 2 : 0);
}
function _dockChromeHeight() {
const dockSide = win._dockState.barSide;
return _dockBodyBlurAnchor.height + ((dockSide === "left" || dockSide === "right") ? win._dockConnectorRadius() * 2 : 0);
return _dockBodyBlurAnchor.height + ((dockSide === "left" || dockSide === "right") ? win._dockConnectorRadiusValue * 2 : 0);
}
function _dockBodyXInChrome() {
return (ConnectorGeometry.isHorizontal(win._dockState.barSide) ? win._dockConnectorRadius() : 0) - win._dockFillOverlapX();
return (ConnectorGeometry.isHorizontal(win._dockState.barSide) ? win._dockConnectorRadiusValue : 0) - win._dockFillOverlapXValue;
}
function _dockBodyYInChrome() {
return ((win._dockState.barSide === "left" || win._dockState.barSide === "right") ? win._dockConnectorRadius() : 0) - win._dockFillOverlapY();
return ((win._dockState.barSide === "left" || win._dockState.barSide === "right") ? win._dockConnectorRadiusValue : 0) - win._dockFillOverlapYValue;
}
function _farConnectorBarSide(sourceSide, placement) {
@@ -1398,13 +1358,13 @@ PanelWindow {
id: _dockFill
x: win._dockBodyXInChrome()
y: win._dockBodyYInChrome()
width: _dockBodyBlurAnchor.width + win._dockFillOverlapX() * 2
height: _dockBodyBlurAnchor.height + win._dockFillOverlapY() * 2
width: _dockBodyBlurAnchor.width + win._dockFillOverlapXValue * 2
height: _dockBodyBlurAnchor.height + win._dockFillOverlapYValue * 2
color: win._opaqueSurfaceColor
z: 1
readonly property string _dockSide: win._dockState.barSide
readonly property real _dockRadius: win._dockBodyBlurRadius()
readonly property real _dockRadius: win._dockBodyBlurRadiusValue
topLeftRadius: (_dockSide === "top" || _dockSide === "left") ? 0 : _dockRadius
topRightRadius: (_dockSide === "top" || _dockSide === "right") ? 0 : _dockRadius
bottomLeftRadius: (_dockSide === "bottom" || _dockSide === "left") ? 0 : _dockRadius
@@ -1417,11 +1377,11 @@ PanelWindow {
barSide: win._dockState.barSide
placement: "left"
spacing: 0
connectorRadius: win._dockConnectorRadius()
connectorRadius: win._dockConnectorRadiusValue
color: win._opaqueSurfaceColor
dpr: win._dpr
x: Theme.snap(ConnectorGeometry.connectorX(win._dockState.barSide, _dockBodyBlurAnchor.x, _dockBodyBlurAnchor.width, "left", 0, win._dockConnectorRadius()) - _dockChrome.x, win._dpr)
y: Theme.snap(ConnectorGeometry.connectorY(win._dockState.barSide, _dockBodyBlurAnchor.y, _dockBodyBlurAnchor.height, "left", 0, win._dockConnectorRadius()) - _dockChrome.y, win._dpr)
x: Theme.snap(ConnectorGeometry.connectorX(win._dockState.barSide, _dockBodyBlurAnchor.x, _dockBodyBlurAnchor.width, "left", 0, win._dockConnectorRadiusValue) - _dockChrome.x, win._dpr)
y: Theme.snap(ConnectorGeometry.connectorY(win._dockState.barSide, _dockBodyBlurAnchor.y, _dockBodyBlurAnchor.height, "left", 0, win._dockConnectorRadiusValue) - _dockChrome.y, win._dpr)
}
ConnectedCorner {
@@ -1430,11 +1390,11 @@ PanelWindow {
barSide: win._dockState.barSide
placement: "right"
spacing: 0
connectorRadius: win._dockConnectorRadius()
connectorRadius: win._dockConnectorRadiusValue
color: win._opaqueSurfaceColor
dpr: win._dpr
x: Theme.snap(ConnectorGeometry.connectorX(win._dockState.barSide, _dockBodyBlurAnchor.x, _dockBodyBlurAnchor.width, "right", 0, win._dockConnectorRadius()) - _dockChrome.x, win._dpr)
y: Theme.snap(ConnectorGeometry.connectorY(win._dockState.barSide, _dockBodyBlurAnchor.y, _dockBodyBlurAnchor.height, "right", 0, win._dockConnectorRadius()) - _dockChrome.y, win._dpr)
x: Theme.snap(ConnectorGeometry.connectorX(win._dockState.barSide, _dockBodyBlurAnchor.x, _dockBodyBlurAnchor.width, "right", 0, win._dockConnectorRadiusValue) - _dockChrome.x, win._dpr)
y: Theme.snap(ConnectorGeometry.connectorY(win._dockState.barSide, _dockBodyBlurAnchor.y, _dockBodyBlurAnchor.height, "right", 0, win._dockConnectorRadiusValue) - _dockChrome.y, win._dpr)
}
}
}

View File

@@ -1,3 +1,5 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.Common
import qs.Services
@@ -8,20 +10,25 @@ QtObject {
property var modelData
property int topMargin: 0
readonly property bool compactMode: SettingsData.notificationCompactMode
readonly property bool notificationConnectedMode: SettingsData.frameEnabled
&& Theme.isConnectedEffect
&& SettingsData.isScreenInPreferences(manager.modelData, SettingsData.frameScreenPreferences)
readonly property bool notificationConnectedMode: SettingsData.frameEnabled && Theme.isConnectedEffect && SettingsData.isScreenInPreferences(manager.modelData, SettingsData.frameScreenPreferences)
readonly property bool closeGapNotifications: notificationConnectedMode && SettingsData.frameCloseGaps
readonly property string notifBarSide: {
const pos = SettingsData.notificationPopupPosition;
if (pos === -1) return "top";
if (pos === -1)
return "top";
switch (pos) {
case SettingsData.Position.Top: return "right";
case SettingsData.Position.Left: return "left";
case SettingsData.Position.BottomCenter: return "bottom";
case SettingsData.Position.Right: return "right";
case SettingsData.Position.Bottom: return "left";
default: return "top";
case SettingsData.Position.Top:
return "right";
case SettingsData.Position.Left:
return "left";
case SettingsData.Position.BottomCenter:
return "bottom";
case SettingsData.Position.Right:
return "right";
case SettingsData.Position.Bottom:
return "left";
default:
return "top";
}
}
readonly property real cardPadding: compactMode ? Theme.notificationCardPaddingCompact : Theme.notificationCardPadding
@@ -519,15 +526,11 @@ QtObject {
}
function _notificationOmitStartConnector() {
return closeGapNotifications
&& (SettingsData.notificationPopupPosition === SettingsData.Position.Top
|| SettingsData.notificationPopupPosition === SettingsData.Position.Left);
return closeGapNotifications && (SettingsData.notificationPopupPosition === SettingsData.Position.Top || SettingsData.notificationPopupPosition === SettingsData.Position.Left);
}
function _notificationOmitEndConnector() {
return closeGapNotifications
&& (SettingsData.notificationPopupPosition === SettingsData.Position.Right
|| SettingsData.notificationPopupPosition === SettingsData.Position.Bottom);
return closeGapNotifications && (SettingsData.notificationPopupPosition === SettingsData.Position.Right || SettingsData.notificationPopupPosition === SettingsData.Position.Bottom);
}
function _onPopupChromeGeometryChanged(p) {

View File

@@ -1,3 +1,5 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Wayland
@@ -85,22 +87,11 @@ Item {
signal popoutClosed
signal backgroundClicked
// Coalesce per-channel dirty bits; one ConnectedModeState write per tick.
Timer {
id: _fullSyncTimer
id: _syncTimer
interval: 0
onTriggered: root._flushFullSync()
}
Timer {
id: _animSyncTimer
interval: 0
onTriggered: root._flushAnimSync()
}
Timer {
id: _bodySyncTimer
interval: 0
onTriggered: root._flushBodySync()
onTriggered: root._flushSync()
}
property var _lastOpenedScreen: null
@@ -281,40 +272,39 @@ Item {
ConnectedModeState.setPopoutBody(_chromeClaimId, root.alignedX, root.renderedAlignedY, root.alignedWidth, root.renderedAlignedHeight);
}
function _queueFullSync() {
if (_fullSyncQueued)
return;
_fullSyncQueued = true;
_fullSyncTimer.restart();
}
function _flushFullSync() {
_fullSyncQueued = false;
_syncPopoutChromeState();
}
property bool _animSyncQueued: false
function _queueAnimSync() {
if (_animSyncQueued)
return;
_animSyncQueued = true;
_animSyncTimer.restart();
}
function _flushAnimSync() {
_animSyncQueued = false;
_syncPopoutAnim("x");
_syncPopoutAnim("y");
}
property bool _bodySyncQueued: false
function _queueBodySync() {
if (_bodySyncQueued)
return;
_bodySyncQueued = true;
_bodySyncTimer.restart();
function _queueFullSync() {
_fullSyncQueued = true;
if (!_syncTimer.running)
_syncTimer.restart();
}
function _flushBodySync() {
function _queueAnimSync() {
_animSyncQueued = true;
if (!_syncTimer.running)
_syncTimer.restart();
}
function _queueBodySync() {
_bodySyncQueued = true;
if (!_syncTimer.running)
_syncTimer.restart();
}
function _flushSync() {
const fullDirty = _fullSyncQueued;
const animDirty = _animSyncQueued;
const bodyDirty = _bodySyncQueued;
_fullSyncQueued = false;
_animSyncQueued = false;
_bodySyncQueued = false;
_syncPopoutBody();
if (fullDirty)
_syncPopoutChromeState();
if (animDirty) {
_syncPopoutAnim("x");
_syncPopoutAnim("y");
}
if (bodyDirty)
_syncPopoutBody();
}
onAlignedXChanged: _queueFullSync()
@@ -373,9 +363,8 @@ Item {
_lastOpenedScreen = screen;
if (contentContainer) {
contentContainer.animX = Theme.snap(contentContainer.offsetX, root.dpr);
contentContainer.animY = Theme.snap(contentContainer.offsetY, root.dpr);
contentContainer.scaleValue = root.animationScaleCollapsed;
// animationsEnabled is false here, so this snaps to closed without animating.
morph.openProgress = 0;
_captureChromeAnimTravel();
}
@@ -880,62 +869,36 @@ Item {
return barBottom ? -root.animationOffset : (barTop ? root.animationOffset : 0);
}
property real animX: 0
property real animY: 0
readonly property real computedScaleCollapsed: root.animationScaleCollapsed
property real scaleValue: computedScaleCollapsed
// openProgress: 0 = closed (at offset, scaleCollapsed), 1 = open (at 0, scale 1).
QtObject {
id: morph
property real openProgress: 0
Behavior on openProgress {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
}
readonly property real animX: contentContainer.offsetX * (1 - morph.openProgress)
readonly property real animY: contentContainer.offsetY * (1 - morph.openProgress)
readonly property real scaleValue: contentContainer.computedScaleCollapsed + (1.0 - contentContainer.computedScaleCollapsed) * morph.openProgress
Component.onCompleted: {
animX = Theme.snap(root.shouldBeVisible ? 0 : offsetX, root.dpr);
animY = Theme.snap(root.shouldBeVisible ? 0 : offsetY, root.dpr);
scaleValue = root.shouldBeVisible ? 1.0 : computedScaleCollapsed;
morph.openProgress = root.shouldBeVisible ? 1 : 0;
root._captureChromeAnimTravel();
}
onOffsetXChanged: {
if (!root.shouldBeVisible)
animX = Theme.snap(offsetX, root.dpr);
}
onOffsetYChanged: {
if (!root.shouldBeVisible)
animY = Theme.snap(offsetY, root.dpr);
}
Connections {
target: root
function onShouldBeVisibleChanged() {
root._captureChromeAnimTravel();
contentContainer.animX = Theme.snap(root.shouldBeVisible ? 0 : contentContainer.offsetX, root.dpr);
contentContainer.animY = Theme.snap(root.shouldBeVisible ? 0 : contentContainer.offsetY, root.dpr);
contentContainer.scaleValue = root.shouldBeVisible ? 1.0 : contentContainer.computedScaleCollapsed;
}
}
Behavior on animX {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
Behavior on animY {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
Behavior on scaleValue {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
morph.openProgress = root.shouldBeVisible ? 1 : 0;
}
}

View File

@@ -1,3 +1,5 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Wayland
@@ -295,9 +297,8 @@ Item {
_lastOpenedScreen = screen;
if (contentContainer) {
contentContainer.animX = Theme.snap(contentContainer.offsetX, root.dpr);
contentContainer.animY = Theme.snap(contentContainer.offsetY, root.dpr);
contentContainer.scaleValue = contentContainer.computedScaleCollapsed;
// animationsEnabled is false here, so this snaps to closed without animating.
morph.openProgress = 0;
}
_setSurfaceGeometry(alignedX, alignedY, alignedWidth, alignedHeight);
@@ -697,10 +698,25 @@ Item {
return barBottom ? -root.animationOffset : (barTop ? root.animationOffset : 0);
}
property real animX: 0
property real animY: 0
readonly property real computedScaleCollapsed: root.animationScaleCollapsed
property real scaleValue: computedScaleCollapsed
// openProgress: 0 = closed (at offset, scaleCollapsed), 1 = open (at 0, scale 1).
QtObject {
id: morph
property real openProgress: 0
Behavior on openProgress {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
}
readonly property real animX: contentContainer.offsetX * (1 - morph.openProgress)
readonly property real animY: contentContainer.offsetY * (1 - morph.openProgress)
readonly property real scaleValue: contentContainer.computedScaleCollapsed + (1.0 - contentContainer.computedScaleCollapsed) * morph.openProgress
readonly property real clampedAnimX: Math.max(-width, Math.min(animX, width))
readonly property real clampedAnimY: Math.max(-height, Math.min(animY, height))
readonly property real revealWidth: {
@@ -724,54 +740,12 @@ Item {
readonly property real revealX: root.fluidStandaloneActive && barRight ? Theme.snap(width - revealWidth, root.dpr) : 0
readonly property real revealY: root.fluidStandaloneActive && barBottom ? Theme.snap(height - revealHeight, root.dpr) : 0
Component.onCompleted: {
animX = Theme.snap(root.shouldBeVisible ? 0 : offsetX, root.dpr);
animY = Theme.snap(root.shouldBeVisible ? 0 : offsetY, root.dpr);
scaleValue = root.shouldBeVisible ? 1.0 : computedScaleCollapsed;
}
onOffsetXChanged: {
if (!root.shouldBeVisible)
animX = Theme.snap(offsetX, root.dpr);
}
onOffsetYChanged: {
if (!root.shouldBeVisible)
animY = Theme.snap(offsetY, root.dpr);
}
Component.onCompleted: morph.openProgress = root.shouldBeVisible ? 1 : 0
Connections {
target: root
function onShouldBeVisibleChanged() {
contentContainer.animX = Theme.snap(root.shouldBeVisible ? 0 : contentContainer.offsetX, root.dpr);
contentContainer.animY = Theme.snap(root.shouldBeVisible ? 0 : contentContainer.offsetY, root.dpr);
contentContainer.scaleValue = root.shouldBeVisible ? 1.0 : contentContainer.computedScaleCollapsed;
}
}
Behavior on animX {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
Behavior on animY {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
Behavior on scaleValue {
enabled: root.animationsEnabled
NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
morph.openProgress = root.shouldBeVisible ? 1 : 0;
}
}