browserui/browser/FavouritesSrc/BrowserFavouritesListbox.cpp
changeset 5 e45c3f40ea5f
parent 1 57d5b8e231c4
child 11 16a119033e3e
--- a/browserui/browser/FavouritesSrc/BrowserFavouritesListbox.cpp	Fri May 08 08:18:43 2009 +0300
+++ b/browserui/browser/FavouritesSrc/BrowserFavouritesListbox.cpp	Fri Jul 03 15:46:41 2009 +0100
@@ -107,6 +107,12 @@
     delete iIconIndexes;
     delete iItems;
     delete iNewState;
+    
+    if ( iFontItalic )
+        {
+        CWsScreenDevice& screenDev = *( CEikonEnv::Static()->ScreenDevice() );
+        screenDev.ReleaseFont( iFontItalic );
+        }
     }
 
 // ---------------------------------------------------------
@@ -653,6 +659,19 @@
                                 listBoxGraphicSize );
 
     ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
+
+
+    // Setup italicized font for use later    
+    const CFont* logicalFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimaryFont);
+    
+    // Note: This font is owned by the application's system font array (where it 
+    // is likely already to have been created) and does not need to be
+    // released. It can just go out of scope.// Extract font information
+    TFontSpec fontSpec = logicalFont->FontSpecInTwips();// Desired height, weight, and posture already set in locals
+    fontSpec.iFontStyle.SetPosture( EPostureItalic );// Obtain new font
+    CWsScreenDevice& screenDev = *( CEikonEnv::Static()->ScreenDevice() );
+    screenDev.GetNearestFontInTwips( ( CFont*& )iFontItalic, fontSpec );
+ 
     }
 
 // ---------------------------------------------------------
@@ -1111,5 +1130,16 @@
     iSkinUpdated = aSkinUpdated;
     }
 
+// ---------------------------------------------------------
+// CBrowserFavouritesListbox::ItalicizeRowItemL
+// ---------------------------------------------------------
+//
+void CBrowserFavouritesListbox::ItalicizeRowItemL(TInt aRowIndex)
+    {
+    if (ItemDrawer() && ItemDrawer()->ColumnData() && iFontItalic)
+        {
+        ItemDrawer()->ColumnData()->SetColumnFontForRowL( aRowIndex, 1, iFontItalic );
+        }
+    }
 
 //  End of File