From 58b9e4bda7e1340c9263f06e3857aedba889521e Mon Sep 17 00:00:00 2001 From: Rocho Date: Wed, 17 Jun 2026 15:46:09 +0200 Subject: [PATCH] fix(dropdown): respect Animation Duration setting for DankDropdown popups (#2661) DankDropdown popups opened and closed at a fixed speed regardless of the configured Animation Duration. The Popup inherited Qt Material's default enter/exit transitions, whose durations are hardcoded and never reference Theme.shortDuration. Override enter/exit with theme-driven transitions that keep the Material grow/fade look (scale + opacity) but read their duration from Theme.shortDuration, so every DankDropdown instance follows the animation-speed setting. Fixes #2659 --- quickshell/Widgets/DankDropdown.qml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/quickshell/Widgets/DankDropdown.qml b/quickshell/Widgets/DankDropdown.qml index e04051f6..5397dadc 100644 --- a/quickshell/Widgets/DankDropdown.qml +++ b/quickshell/Widgets/DankDropdown.qml @@ -289,6 +289,40 @@ Item { dim: false closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside + enter: Transition { + NumberAnimation { + property: "scale" + from: 0.9 + to: 1 + duration: Theme.shortDuration + easing.type: Theme.emphasizedEasing + } + NumberAnimation { + property: "opacity" + from: 0 + to: 1 + duration: Theme.shortDuration + easing.type: Theme.standardEasing + } + } + + exit: Transition { + NumberAnimation { + property: "scale" + from: 1 + to: 0.9 + duration: Theme.shortDuration + easing.type: Theme.emphasizedEasing + } + NumberAnimation { + property: "opacity" + from: 1 + to: 0 + duration: Theme.shortDuration + easing.type: Theme.standardEasing + } + } + background: Rectangle { color: "transparent" }