diff options
author | Daniel d'Andrada <daniel.dandrada@nokia.com> | 2011-01-17 14:42:07 +0200 |
---|---|---|
committer | Daniel d'Andrada <daniel.dandrada@nokia.com> | 2011-01-17 16:09:22 +0200 |
commit | 5875fbd911d8a9a0cee50975b1f365655349d207 (patch) | |
tree | 3ad9486d4eb16591886d2d83f69f6a5c9bae5421 | |
parent | 5e5d6bb60cdcf3774b87bb27f5ac1514de3a9094 (diff) |
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".
-rw-r--r-- | src/corelib/scene/mscenemanager.cpp | 10 | ||||
-rw-r--r-- | 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<MAbstractWidgetAnimation*>( + MTheme::animation(style()->navigationBarAnimation())); + break; case MSceneWindow::ApplicationMenu: animation = qobject_cast<MAbstractWidgetAnimation*>( 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<MAbstractWidgetAnimation*>( + MTheme::animation(style()->navigationBarAnimation())); + break; case MSceneWindow::ApplicationMenu: animation = qobject_cast<MAbstractWidgetAnimation*>( 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 |