Fixed, changed transition from slide to page
authorchitta ranjan <chitta.rs@samsung.com>
Tue, 9 Apr 2013 08:13:14 +0000 (17:13 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Tue, 9 Apr 2013 08:13:14 +0000 (17:13 +0900)
Change-Id: Ib2c3126abeccb5a8309ed4bd9f01ed247353cccb
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
inc/IvTypes.h
src/IvImageViewerForm.cpp
src/IvImageViewerPresentationModel.cpp

index acdac2f..ca9a0e3 100644 (file)
@@ -69,7 +69,7 @@ enum ActionID
 
 enum SlideShowTransitionEffect
 {
-       SLIDE_SHOW_TRANSITION_EFFECT_SLIDE = 0,
+       SLIDE_SHOW_TRANSITION_EFFECT_PAGE = 0,
        SLIDE_SHOW_TRANSITION_EFFECT_DISSOLVE,
        SLIDE_SHOW_TRANSITION_EFFECT_ZOOM
 };
index 543393b..78f1462 100644 (file)
@@ -578,7 +578,8 @@ ImageViewerForm::CreateGallery(void)
        case SLIDE_SHOW_TRANSITION_EFFECT_ZOOM:
                __pGallery->SetSlideShowAnimation(Controls::GALLERY_ANIMATION_ZOOM);
                break;
-       case SLIDE_SHOW_TRANSITION_EFFECT_SLIDE:
+       case SLIDE_SHOW_TRANSITION_EFFECT_PAGE:
+               __pGallery->SetSlideShowAnimation(Controls::GALLERY_ANIMATION_PAGE);
                break;
        }
 
@@ -872,7 +873,6 @@ ImageViewerForm::SetDetailInfo(void)
 
        Rectangle clientRect = GetClientAreaBounds();
        __pScrollPanel->SetBounds(0,__pLabel->GetHeight(), clientRect.width, clientRect.height - __pLabel->GetHeight());
-
        int currentIndex = __pGallery->GetCurrentItemIndex();
        String strFilePath = __pPresentationModel->GetFilePathAt(currentIndex);
 
@@ -986,7 +986,23 @@ ImageViewerForm::SetDetailInfo(void)
        for (int i = 0; i < DETAIL_COUNT_MAX; ++i)
        {
                __pDetail_FileInfo_Value_Label[i]->SetText(strResult[i]);
-               __pDetail_FileInfo_Value_Label[i]->RequestRedraw();
+
+               if (i == DETAIL_COUNT_MAX - 1)
+               {
+                       __pDetail_FileInfo_Value_Label[i]->SetBounds(
+                                       Rectangle(X_DETAIL_FILEINFO_LABEL,
+                                                       GAP_H_DETAIL_TEXT * (i + 1) + H_DETAIL_MAIN_TEXT + (H_DETAIL_MAIN_TEXT * i) + H_DETAIL_SUB_TEXT * (i + 1),
+                                                       clientRect.width - GAP_W_END_OF_LABEL, H_DETAIL_FILEINFO_VALUE_LABEL * 3));
+               }
+               else
+               {
+                       __pDetail_FileInfo_Value_Label[i]->SetBounds(
+                                       Rectangle(X_DETAIL_FILEINFO_LABEL,
+                                                       GAP_H_DETAIL_TEXT * (i + 1) + H_DETAIL_MAIN_TEXT + (H_DETAIL_MAIN_TEXT * i) + H_DETAIL_SUB_TEXT * (i + 1),
+                                                       clientRect.width - GAP_W_END_OF_LABEL, H_DETAIL_FILEINFO_VALUE_LABEL));
+               }
+
+               __pDetail_FileInfo_Value_Label[i]->Invalidate(true);
        }
 
        if (__initializeDisplayModeCurrent == APPCONTROL_MODE_WEB_LINK)
@@ -1811,8 +1827,7 @@ ImageViewerForm::OnTimerExpired(Timer &timer)
                 __pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER,
                                                        ENTRY_NAME_IMAGE_VIEWER_SHUFFLE_VALUE, shuffleValue);
 
-               
-               if(shuffleValue != 0)
+               if (shuffleValue != 0)
                {
                        __shuffelStartIndex = __pGallery->GetCurrentItemIndex();
                        CreateShuffledList(__pPresentationModel->GetFileCount());
@@ -1824,7 +1839,7 @@ ImageViewerForm::OnTimerExpired(Timer &timer)
                        __shuffle = false;
                }
 
-               if( repeatValue == 0)
+               if ( repeatValue == 0)
                {
                        __pGallery->StartSlideShow(false);
                }
@@ -2219,9 +2234,8 @@ ImageViewerForm::OnSlideSettingPopUpItemSelected(int index)
        if (index == 0)   // start slide show
        {
        int repeatValue = 0;
-
                int interval = 0 ;
-
+               int transitioneffect = 0;
 
                if (__pPresentationModel->GetFileCount() > 1)
                {
@@ -2247,6 +2261,22 @@ ImageViewerForm::OnSlideSettingPopUpItemSelected(int index)
                        __pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER,
                                        ENTRY_NAME_IMAGE_VIEWER_SHUFFLE_VALUE, shuffleValue);
 
+                        __pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER,
+                                   ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT, transitioneffect);
+
+                        if (transitioneffect == 1)
+                        {
+                                __pGallery->SetSlideShowAnimation(GALLERY_ANIMATION_DISSOLVE);
+                        }
+                        else if (transitioneffect == 2)
+                        {
+                                __pGallery->SetSlideShowAnimation(GALLERY_ANIMATION_ZOOM);
+                        }
+                        else
+                        {
+                                __pGallery->SetSlideShowAnimation(GALLERY_ANIMATION_PAGE);
+                        }
+
                        if (shuffleValue != 0)
                        {
                                __shuffelStartIndex = __pGallery->GetCurrentItemIndex();
index ff6fd48..0c99032 100644 (file)
@@ -19,7 +19,7 @@
  * @brief              This is the implementation file for ImageViewerPresentationModel class.
  */
 
-#include <cstdlib>
+
 #include <FContent.h>
 #include <FIo.h>
 #include <FMedia.h>
@@ -59,7 +59,7 @@ ImageViewerPresentationModel::ImageViewerPresentationModel(void)
        , __startIndex(0)
        , __setterIndex(0)
        , __durationOfSlideShow(0)
-       , __transitionEffectOfSlideShow(SLIDE_SHOW_TRANSITION_EFFECT_SLIDE)
+       , __transitionEffectOfSlideShow(SLIDE_SHOW_TRANSITION_EFFECT_PAGE)
        , __pSettingPresentationModel(null)
        , __ivTriggeredEvent(false)
        , __contentFileEventType(-1)
@@ -522,7 +522,7 @@ ImageViewerPresentationModel::LoadSettingValue()
        switch (returnValue)
        {
        case 0:
-               __transitionEffectOfSlideShow = SLIDE_SHOW_TRANSITION_EFFECT_SLIDE;
+               __transitionEffectOfSlideShow = SLIDE_SHOW_TRANSITION_EFFECT_PAGE;
                break;
        case 1:
                __transitionEffectOfSlideShow = SLIDE_SHOW_TRANSITION_EFFECT_DISSOLVE;