From 5875fbd911d8a9a0cee50975b1f365655349d207 Mon Sep 17 00:00:00 2001 From: Daniel d'Andrada Date: Mon, 17 Jan 2011 14:42:07 +0200 Subject: Changes: Make navigation bar animation themeable RevBy: Stanislav Ionascu, Marcin Miklas Details: Notice that this is different than the animation of the navigation bar contents, which is currently hardcoded to "slide and fade". --- src/corelib/scene/mscenemanager.cpp | 10 ++++++++-- src/corelib/style/mscenemanagerstyle.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/corelib/scene/mscenemanager.cpp b/src/corelib/scene/mscenemanager.cpp index 764edc17..144a2314 100644 --- a/src/corelib/scene/mscenemanager.cpp +++ b/src/corelib/scene/mscenemanager.cpp @@ -1622,9 +1622,12 @@ void MSceneManagerPrivate::createAppearanceAnimationForSceneWindow(MSceneWindow switch(sceneWindow->windowType()) { case MSceneWindow::NotificationInformation: case MSceneWindow::NotificationEvent: - case MSceneWindow::NavigationBar: animation = new MWidgetSlideAnimation(sceneWindow); break; + case MSceneWindow::NavigationBar: + animation = qobject_cast( + MTheme::animation(style()->navigationBarAnimation())); + break; case MSceneWindow::ApplicationMenu: animation = qobject_cast( MTheme::animation(style()->applicationMenuAnimation())); @@ -1685,9 +1688,12 @@ void MSceneManagerPrivate::createDisappearanceAnimationForSceneWindow(MSceneWind switch(sceneWindow->windowType()) { case MSceneWindow::NotificationInformation: case MSceneWindow::NotificationEvent: - case MSceneWindow::NavigationBar: animation = new MWidgetSlideAnimation(sceneWindow); break; + case MSceneWindow::NavigationBar: + animation = qobject_cast( + MTheme::animation(style()->navigationBarAnimation())); + break; case MSceneWindow::ApplicationMenu: animation = qobject_cast( MTheme::animation(style()->applicationMenuAnimation())); diff --git a/src/corelib/style/mscenemanagerstyle.h b/src/corelib/style/mscenemanagerstyle.h index a19fd4b1..74c5d9e8 100644 --- a/src/corelib/style/mscenemanagerstyle.h +++ b/src/corelib/style/mscenemanagerstyle.h @@ -36,6 +36,7 @@ class MSceneManagerStyle : public MStyle M_STYLE_ATTRIBUTE(QString, messageBoxAnimation, MessageBoxAnimation) M_STYLE_ATTRIBUTE(QString, statusBarAnimation, StatusBarAnimation) M_STYLE_ATTRIBUTE(QString, objectMenuAnimation, ObjectMenuAnimation) + M_STYLE_ATTRIBUTE(QString, navigationBarAnimation, NavigationBarAnimation) }; class MSceneManagerStyleContainer : public MStyleContainer -- cgit v1.2.3