diff -r aecbbf00d063 -r d48ab3b357f1 uifw/AvKon/src/Aknslider.cpp --- a/uifw/AvKon/src/Aknslider.cpp Tue Aug 31 15:28:30 2010 +0300 +++ b/uifw/AvKon/src/Aknslider.cpp Wed Sep 01 12:16:19 2010 +0100 @@ -65,8 +65,6 @@ const TInt KScrollRepeatTimeout = 250000; // 0.25 seconds const TInt KStableFeedbackIntesity = 100; const TInt KFeedbackTimeout = 100000; -const TInt KNoFeedbackTimeout = 0; -const TInt KStepThreshold = 15; // ============================================================================ // Internal class to hold slider control data, primarily coming from resource. NONSHARABLE_CLASS( CAknSliderData ): public CBase @@ -539,12 +537,12 @@ }; const TAknsItemID iconSkinIDArray[] = { - KAknsIIDNone,//KAknsIIDQgnGrafNsliderVerticalTop, - KAknsIIDNone,//KAknsIIDQgnGrafNsliderVerticalBottom, - KAknsIIDNone,//KAknsIIDQgnGrafNsliderVerticalMiddle, - KAknsIIDNone,// KAknsIIDQgnGrafNsliderVerticalMarker, - KAknsIIDNone,// KAknsIIDQgnGrafNsliderVerticalTIckMajor, - KAknsIIDNone//KAknsIIDQgnGrafNsliderVerticalMarker + KAknsIIDQgnGrafNsliderVerticalTop, //KAknsIIDNone, + KAknsIIDQgnGrafNsliderVerticalBottom,//KAknsIIDNone, + KAknsIIDQgnGrafNsliderVerticalMiddle,//KAknsIIDNone, + KAknsIIDQgnGrafNsliderVerticalMarker,//KAknsIIDNone, + KAknsIIDQgnGrafNsliderVerticalTickMajor,//KAknsIIDNone, + KAknsIIDQgnGrafNsliderVerticalMarker//KAknsIIDNone }; const TInt element[] = @@ -1499,7 +1497,12 @@ TResourceReader reader; CEikonEnv::Static()->CreateResourceReaderLC( reader, aResourceId ); - reader.ReadInt16(); // ignore layout + TInt sliderType = reader.ReadInt16(); + if ( sliderType == EAknSliderWithFeedbackStyle ) + { + reader.ReadInt16(); // ignore type + reader.ReadInt16(); // ignore layout + } TInt minValue = reader.ReadInt16(); TInt maxValue = reader.ReadInt16(); CleanupStack::PopAndDestroy(); // reader @@ -1540,7 +1543,12 @@ TResourceReader reader; CEikonEnv::Static()->CreateResourceReaderLC( reader, aResourceId ); - reader.ReadInt16(); // ignore layout + TInt sliderType = reader.ReadInt16(); + if ( sliderType == EAknSliderWithFeedbackStyle ) + { + reader.ReadInt16(); // ignore type + reader.ReadInt16(); // ignore layout + } TInt minValue = reader.ReadInt16(); TInt maxValue = reader.ReadInt16(); CleanupStack::PopAndDestroy(); // reader @@ -3150,15 +3158,6 @@ { if ( touchDownArea.Contains( aEvent.iPosition ) ) { - TInt stepCount = SliderData()->Range() / SliderData()->iStepSize; - if ( stepCount <= KStepThreshold ) - { - MTouchFeedback* feedback = MTouchFeedback::Instance(); - if ( feedback ) - { - feedback->InstantFeedback( this, ETouchFeedbackBasicSlider, aEvent ); - } - } // repeat until thumb reaches the stylus down position iExt->iPenInputPos = aEvent.iPosition; @@ -3170,7 +3169,7 @@ MTouchFeedback* feedback = MTouchFeedback::Instance(); if ( feedback ) { - feedback->InstantFeedback( this, ETouchFeedbackBasicSlider, aEvent ); + feedback->InstantFeedback( this, ETouchFeedbackSlider, aEvent ); } iExt->SetFlag( CAknSliderExtension::EFlagDraggingThumb ); reportDragEvent = EDragMarkerStart; @@ -3257,7 +3256,7 @@ if ( feedback ) { feedback->InstantFeedback( this, - ETouchFeedbackBasicSlider, + ETouchFeedbackSlider, ETouchFeedbackVibra, aEvent ); } @@ -3618,29 +3617,11 @@ { if( aFeedback ) { - TInt stepCount = SliderData()->Range() / SliderData()->iStepSize; - if ( stepCount > KStepThreshold ) - { - if ( iExt->IsFlagSet( CAknSliderExtension::EFlagPlayingContinuousFb )) - { - if ( SliderData()->iFeedbackStyle == EAknSliderFbDynamic ) - { - ModifyFeedback(); - } - } - else - { - StartFeedback( NULL, KNoFeedbackTimeout ); - } - } - else - { - MTouchFeedback* feedback = MTouchFeedback::Instance(); - if ( feedback ) - { - feedback->InstantFeedback( this, ETouchFeedbackBasicSlider ); - } - } + MTouchFeedback* feedback = MTouchFeedback::Instance(); + if ( feedback ) + { + feedback->InstantFeedback( this, ETouchFeedbackSlider ); + } } Window().Invalidate( Rect() ); @@ -4209,7 +4190,8 @@ if ( Layout() != EAknSettingsItemSliderLayout && Layout() != EAknSettingsItemSliderLayoutWithGraphics && Layout() != EAknSliderLayoutVertical && - Layout() != EAknSliderLayoutHorizontal ) + Layout() != EAknSliderLayoutHorizontal && + Layout() != EAknMIDPFormSliderLayout ) { error = AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8 ); @@ -4277,12 +4259,16 @@ MTouchFeedback* feedback = MTouchFeedback::Instance(); if ( feedback ) { + TTouchContinuousFeedback type = ETouchContinuousSmooth; TInt intensity = KStableFeedbackIntesity; + if ( SliderData()->iFeedbackStyle == EAknSliderFbDynamic ) { + type = ETouchDynamicSlider; intensity = FeedbackIntensity(); } - feedback->StartFeedback( this, ETouchContinuousSlider, aPointerEvent, intensity, aTimeout ); + + feedback->StartFeedback( this, type, aPointerEvent, intensity, aTimeout ); iExt->SetFlag( CAknSliderExtension::EFlagPlayingContinuousFb ); } }