From 29a93a2e57dee4aac766e7f565cc35eacfa52f09 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Wed, 15 May 2024 09:06:05 -0600 Subject: [PATCH] plugins/slidingpopups: use standard duration values Right now the opening duration is 150ms, and the closing duration is 250ms. Neither are standard durations we use elsewhere, and it's also a bit odd to be slower to close than to open--at least from a visual perspective. The average of these value happens to be 200ms, which happily is the exact value of Kirigami.Units.longDuration. As such, use that value instead, in the interests of visual consistency. --- src/plugins/slidingpopups/slidingpopups.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/slidingpopups/slidingpopups.cpp b/src/plugins/slidingpopups/slidingpopups.cpp index dcc1d75dc0..8cd4e306ef 100644 --- a/src/plugins/slidingpopups/slidingpopups.cpp +++ b/src/plugins/slidingpopups/slidingpopups.cpp @@ -101,10 +101,11 @@ bool SlidingPopupsEffect::supported() void SlidingPopupsEffect::reconfigure(ReconfigureFlags flags) { SlidingPopupsConfig::self()->read(); + // Keep these durations in sync with the value of Kirigami.Units.longDuration m_slideInDuration = std::chrono::milliseconds( - static_cast(animationTime(SlidingPopupsConfig::slideInTime() != 0 ? std::chrono::milliseconds(SlidingPopupsConfig::slideInTime()) : 150ms))); + static_cast(animationTime(SlidingPopupsConfig::slideInTime() != 0 ? std::chrono::milliseconds(SlidingPopupsConfig::slideInTime()) : 200ms))); m_slideOutDuration = std::chrono::milliseconds( - static_cast(animationTime(SlidingPopupsConfig::slideOutTime() != 0 ? std::chrono::milliseconds(SlidingPopupsConfig::slideOutTime()) : 250ms))); + static_cast(animationTime(SlidingPopupsConfig::slideOutTime() != 0 ? std::chrono::milliseconds(SlidingPopupsConfig::slideOutTime()) : 200ms))); auto animationIt = m_animations.begin(); while (animationIt != m_animations.end()) {