From 798f0a148d7dd5c7972976fb9f9bb5e678681462 Mon Sep 17 00:00:00 2001 From: Clemens Manert Date: Tue, 25 Apr 2023 23:28:08 +0200 Subject: [PATCH] Use animation hint for transition --- src/layouts/QskDrawer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/layouts/QskDrawer.cpp b/src/layouts/QskDrawer.cpp index 72499385..da1faf23 100644 --- a/src/layouts/QskDrawer.cpp +++ b/src/layouts/QskDrawer.cpp @@ -26,7 +26,7 @@ QskDrawer::QskDrawer( QQuickItem* parentItem ) : m_data->content = new QskBox(this); m_data->content->setSubcontrolProxy( QskBox::Panel, QskDrawer::DasPanel ); - setAnimationHint( QskDrawer::DasPanel | QskAspect::Metric, QskAnimationHint(300) ); + setAnimationHint( DasPanel | QskAspect::Position, QskAnimationHint( 1000 ) ); setFaderAspect( DasPanel | QskAspect::Metric ); @@ -34,7 +34,8 @@ QskDrawer::QskDrawer( QQuickItem* parentItem ) : connect(this, &QskDrawer::closed, this, [this](){ startTransition( DasPanel | QskAspect::Metric, - QskAnimationHint(200), 0.0, 1.0 ); + animationHint( DasPanel | QskAspect::Position ), + 0.0, 1.0 ); }); } @@ -90,7 +91,9 @@ void QskDrawer::updateLayout() { void QskDrawer::aboutToShow() { - startTransition( DasPanel | QskAspect::Metric, QskAnimationHint(200), 1.0, .0 ); + startTransition( DasPanel | QskAspect::Metric, + animationHint( DasPanel | QskAspect::Position ), + 1.0, 0.0 ); Inherited::aboutToShow(); }