idlehomescreen/xmluirendering/uiengine/src/xnbgcontrol.cpp
changeset 2 08c6ee43b396
parent 0 f72a12da539e
child 5 c743ef5928ba
--- a/idlehomescreen/xmluirendering/uiengine/src/xnbgcontrol.cpp	Thu Jan 07 12:39:41 2010 +0200
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnbgcontrol.cpp	Mon Jan 18 20:10:36 2010 +0200
@@ -69,7 +69,6 @@
 //
 CXnBgControl::~CXnBgControl()
     {  
-    delete iBgContext;
     }
 
 // -----------------------------------------------------------------------------
@@ -89,13 +88,18 @@
 void CXnBgControl::ConstructL()
     {   
     CreateWindowL();
+
+    TRgb backgroundColour = KRgbWhite;
+    if( KErrNone == Window().SetTransparencyAlphaChannel() )      
+        {       
+        backgroundColour.SetAlpha( 0 );       
+        }   
+    Window().SetBackgroundColor( backgroundColour );
     
     EnableDragEvents();
     
     Window().SetPointerGrab( ETrue );
-      
-    iBgContext = CAknsLayeredBackgroundControlContext::NewL(
-        KAknsIIDWallpaper, TRect(), ETrue, 1 );
+    
     
     ActivateL();
 
@@ -141,15 +145,6 @@
 //
 void CXnBgControl::SizeChanged()
     {
-    TRect rect;
-    
-#ifdef RD_FULLSCREEN_WALLPAPER    
-    AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, rect );
-#else
-    AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, rect );
-#endif
-       
-    iBgContext->SetRect( rect );    
     }
 
 // -----------------------------------------------------------------------------
@@ -171,10 +166,8 @@
         // No background needed for dragging widget screenshot        
         }
     else
-        {
-        MAknsSkinInstance* skin( AknsUtils::SkinInstance() );
-               
-        AknsDrawUtils::Background( skin, iBgContext, this, gc, aRect );        
+        {        
+        gc.Clear( aRect );        
         }          
     }