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

frame(Motion): Restore fluid motion & Update component connections

This commit is contained in:
purian23
2026-04-30 13:58:53 -04:00
parent 75f8c5dec2
commit 39d8f407df
15 changed files with 551 additions and 272 deletions

View File

@@ -53,7 +53,8 @@ DankPopout {
function __hideDropdowns() {
__volumeCloseTimer.stop();
__dropdownType = 0;
__mediaTabRef?.resetDropdownStates();
if (__mediaTabRef && typeof __mediaTabRef.resetDropdownStates === "function")
__mediaTabRef.resetDropdownStates();
}
function __startCloseTimer() {
@@ -74,7 +75,11 @@ DankPopout {
}
}
overlayContent: Component {
overlayContent: shouldBeVisible ? mediaDropdownOverlayComponent : null
Component {
id: mediaDropdownOverlayComponent
MediaDropdownOverlay {
dropdownType: root.__dropdownType
anchorPos: root.__dropdownAnchor
@@ -182,11 +187,8 @@ DankPopout {
Connections {
target: root
function onShouldBeVisibleChanged() {
if (root.shouldBeVisible) {
Qt.callLater(function () {
mainContainer.forceActiveFocus();
});
}
if (root.shouldBeVisible)
mainContainer.forceActiveFocus();
}
}
@@ -378,6 +380,10 @@ DankPopout {
section: root.triggerSection
barPosition: root.effectiveBarPosition
Component.onCompleted: root.__mediaTabRef = this
Component.onDestruction: {
if (root.__mediaTabRef === this)
root.__mediaTabRef = null;
}
onShowVolumeDropdown: (pos, screen, rightEdge, player, players) => {
root.__showVolumeDropdown(pos, rightEdge, player, players);
}

View File

@@ -50,11 +50,9 @@ Item {
}
function volumeAreaExited() {
__volumeHoverCount--;
Qt.callLater(() => {
if (__volumeHoverCount <= 0)
panelExited();
});
__volumeHoverCount = Math.max(0, __volumeHoverCount - 1);
if (__volumeHoverCount === 0)
panelExited();
}
readonly property Item __activePanel: {