--- a/uifw/AvKon/src/AknTransparentCameraSettingPage.cpp Tue Aug 31 15:28:30 2010 +0300
+++ b/uifw/AvKon/src/AknTransparentCameraSettingPage.cpp Wed Sep 01 12:16:19 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -17,7 +17,6 @@
*
*/
-
#include "AknTransparentCameraSettingPage.h"
// For icon support
@@ -173,6 +172,15 @@
BaseConstructL( KAknSettingPageNoEmbeddedSoftKeys );
SetDrawBackground(EFalse); // Enable transparent drawing
+ if( CAknEnv::Static()->TransparencyEnabled() )
+ {
+ // try to enable window transparency
+ if ( Window().SetTransparencyAlphaChannel() == KErrNone )
+ {
+ Window().SetRequiredDisplayMode( EColor16MA );
+ Window().SetBackgroundColor( ~0 );
+ }
+ }
GenerateInternalArrayAndGiveToListBoxL();
@@ -217,7 +225,16 @@
// Set the current "pushed in" indication
if ( iCurrentSelectionIndex != -1 )
- listBox->View()->SelectItemL( iCurrentSelectionIndex );
+ {
+ //
+ // SelectItemL make the view item drawn by default, SetDisableRedraw can remove flick
+ //
+ TBool bRedrawDisabled = listBox->View()->RedrawDisabled();
+ listBox->View()->SetDisableRedraw( ETrue );
+
+ listBox->View()->SelectItemL( iCurrentSelectionIndex );
+ listBox->View()->SetDisableRedraw( bRedrawDisabled );
+ }
// Set the scroller indication off
listBox->CreateScrollBarFrameL(ETrue);
@@ -227,7 +244,9 @@
listBox->UpdateScrollBarsL();
if(!IsBackgroundDrawingEnabled())
- listBox->ScrollBarFrame()->DrawBackground(EFalse, EFalse);
+ {
+ listBox->ScrollBarFrame()->DrawBackground(EFalse, EFalse);
+ }
// Force a size changed
@@ -339,9 +358,16 @@
// Respond to softkey events
switch (aCommandId)
{
+ case EAknSoftkeySelect:
+ {
+ if ( EnableSingleClickHighlight( aCommandId ) )
+ {
+ break;
+ }
+ // no single click mode was enabled, fall through
+ }
case EAknSoftkeyOk:
- case EAknSoftkeySelect:
- case EAknSoftkeyDone:
+ case EAknSoftkeyDone:
SelectCurrentItemL(); // has non-trivial implemenations in listbox type
// controls to put the selection on the current item
AttemptExitL(ETrue);
@@ -383,7 +409,9 @@
// Only in single click enabled applications.
if ( iExtension &&
iExtension->iFlags.IsSet(
- CAknTransparentCameraSettingPageExtension::ESingleClickEnabled ) )
+ CAknTransparentCameraSettingPageExtension::ESingleClickEnabled ) &&
+ iCurrentSelectionIndex >= 0 &&
+ iCurrentSelectionIndex < ListBoxControl()->Model()->NumberOfItems() )
{
ListBoxControl()->View()->SetCurrentItemIndex(
iCurrentSelectionIndex );
@@ -544,13 +572,6 @@
parentRect,
KAknsDrawParamDefault);
}
- else
- {
- gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
- gc.SetPenStyle(CGraphicsContext::ENullPen);
- gc.SetBrushColor(KRgbWhite);
- gc.DrawRect (bgRect);
- }
}
// draw viewfinder if available