equal
deleted
inserted
replaced
287 // |
287 // |
288 void CFsControlBarVisualiser::UpdateSizeL() |
288 void CFsControlBarVisualiser::UpdateSizeL() |
289 { |
289 { |
290 FUNC_LOG; |
290 FUNC_LOG; |
291 iBarLayout->SetSize( iModel.Size() ); |
291 iBarLayout->SetSize( iModel.Size() ); |
|
292 iBarLayout->SetPos( iModel.Pos() ); |
292 RefreshL(); |
293 RefreshL(); |
293 } |
294 } |
294 |
295 |
295 |
296 |
296 // --------------------------------------------------------------------------- |
297 // --------------------------------------------------------------------------- |
332 { |
333 { |
333 if ( iSelector->Brushes()->Count() ) |
334 if ( iSelector->Brushes()->Count() ) |
334 { |
335 { |
335 iSelector->Brushes()->Remove( iSelector->Brushes()->Count() - 1 ); |
336 iSelector->Brushes()->Remove( iSelector->Brushes()->Count() - 1 ); |
336 } |
337 } |
337 |
|
338 iSelector->Brushes()->AppendL( |
338 iSelector->Brushes()->AppendL( |
339 aSelectorBrush, EAlfDoesNotHaveOwnership ); |
339 aSelectorBrush, EAlfDoesNotHaveOwnership ); |
340 iSelector->SetOpacity( aOpacity ); |
340 iSelector->SetOpacity( aOpacity ); |
341 } |
341 } |
342 |
342 |
393 // |
393 // |
394 void CFsControlBarVisualiser::MakeSelectorVisible( |
394 void CFsControlBarVisualiser::MakeSelectorVisible( |
395 TBool aShow, TBool aFromTouch ) |
395 TBool aShow, TBool aFromTouch ) |
396 { |
396 { |
397 FUNC_LOG; |
397 FUNC_LOG; |
398 |
|
399 TReal32 opacity( 0 ); |
398 TReal32 opacity( 0 ); |
400 if( aShow ) |
399 if( aShow ) |
401 { |
400 { |
402 opacity = 1; |
401 opacity = KFsSelectorOpacity; |
403 } |
402 } |
404 if( iSelector ) |
403 if( iSelector ) |
405 { |
404 { |
406 iTouchPressed = aFromTouch; |
405 iTouchPressed = aFromTouch; |
407 CFsControlButton* button = NULL; |
406 CFsControlButton* button = NULL; |
427 void CFsControlBarVisualiser::DrawSelectorL( |
426 void CFsControlBarVisualiser::DrawSelectorL( |
428 const TInt aSelectedButtonIndex, |
427 const TInt aSelectedButtonIndex, |
429 TBool aFastDraw ) |
428 TBool aFastDraw ) |
430 { |
429 { |
431 FUNC_LOG; |
430 FUNC_LOG; |
432 CFsControlButtonVisualiser* vis( NULL ); |
431 CFsControlButtonVisualiser* vis = NULL; |
433 |
432 |
434 // set selector's delay |
433 // set selector's delay |
435 TInt transitionTime( aFastDraw ? 0 : iModel.SelectorTransitionTime() ); |
434 TInt transitionTime( aFastDraw ? 0 : iModel.SelectorTransitionTime() ); |
436 TBool setDefaultBrushBorders( EFalse ); |
435 TBool setDefaultBrushBorders( EFalse ); |
437 |
436 |
481 point.operator-=( |
480 point.operator-=( |
482 TPoint( KFsSelectorPaddingLeft, KFsSelectorPaddingTop ) ); |
481 TPoint( KFsSelectorPaddingLeft, KFsSelectorPaddingTop ) ); |
483 size += TSize( KFsSelectorPaddingLeft + KFsSelectorPaddingRight, |
482 size += TSize( KFsSelectorPaddingLeft + KFsSelectorPaddingRight, |
484 KFsSelectorPaddingTop + KFsSelectorPaddingBottom ); |
483 KFsSelectorPaddingTop + KFsSelectorPaddingBottom ); |
485 |
484 |
|
485 // Hides transition when item selected via touch |
486 if( iTouchPressed ) |
486 if( iTouchPressed ) |
487 { |
487 { |
488 transitionTime = 0; |
488 transitionTime = 0; |
489 iTouchPressed = EFalse; |
489 iTouchPressed = EFalse; |
490 } |
490 } |
527 // --------------------------------------------------------------------------- |
527 // --------------------------------------------------------------------------- |
528 // |
528 // |
529 void CFsControlBarVisualiser::HideSelector() |
529 void CFsControlBarVisualiser::HideSelector() |
530 { |
530 { |
531 FUNC_LOG; |
531 FUNC_LOG; |
532 iLastSelectedButton = -1; |
532 iLastSelectedButton = KErrNotFound; |
533 if ( iSelector ) |
533 if ( iSelector ) |
534 { |
534 { |
535 // Flags used because otherwise it would generate a callback here |
535 // Flags used because otherwise it would generate a callback here |
536 // before the visual is fully destroyed. |
536 // before the visual is fully destroyed. |
537 iBarLayout->SetFlag( EAlfVisualFlagFreezeLayout ); |
537 iBarLayout->SetFlag( EAlfVisualFlagFreezeLayout ); |