mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-17 16:45:19 -04:00
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
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user