199 // |
199 // |
200 CAlfFrameBrush* CFreestyleEmailUiTextureManager::NewCtrlBarSelectorBrushLC() |
200 CAlfFrameBrush* CFreestyleEmailUiTextureManager::NewCtrlBarSelectorBrushLC() |
201 { |
201 { |
202 FUNC_LOG; |
202 FUNC_LOG; |
203 |
203 |
204 // Use FS specific skin ID if it's found, otherwise use general list highlight. |
204 // Use FS specific skin ID if it's found, otherwise use general list |
205 // This need to be checked before CHuiFrameBrush::NewL as it never leaves |
205 // highlight. This need to be checked before CHuiFrameBrush::NewL as it |
206 // even if the skin ID is not found. Another option would be to try first with |
206 // never leaves even if the skin ID is not found. Another option would be |
207 // FS specific skin ID, TRAP SetFrameRectsL-function call, and if it leaves, |
207 // to try first with FS specific skin ID, TRAP SetFrameRectsL-function |
208 // then recreate frame brush with general skin ID and recall SetFrameRectsL. |
208 // call, and if it leaves, then recreate frame brush with general skin ID |
|
209 // and recall SetFrameRectsL. |
209 TAknsItemID skinId = KAknsIIDQgnFsList; |
210 TAknsItemID skinId = KAknsIIDQgnFsList; |
210 CAknsItemData* temp = AknsUtils::SkinInstance()->GetCachedItemData( skinId ); |
211 CAknsItemData* temp = |
|
212 AknsUtils::SkinInstance()->GetCachedItemData( skinId ); |
|
213 |
211 if( !temp ) |
214 if( !temp ) |
212 { |
215 { |
213 skinId = KAknsIIDQsnFrList; |
216 skinId = KAknsIIDQsnFrList; |
214 } |
217 } |
215 |
218 |
216 CAlfFrameBrush* frameBrush(0); |
219 CAlfFrameBrush* frameBrush( 0 ); |
217 frameBrush = CAlfFrameBrush::NewLC( *iEnv, skinId ); |
220 frameBrush = CAlfFrameBrush::NewLC( *iEnv, skinId ); |
218 |
221 |
219 TRect testOuterRect(0,0,300,80); |
222 TRect outerRect( 0, 0, 300, 80 ); |
220 TRect testInnerRect(4,4,296,76); |
223 TRect innerRect( outerRect ); |
221 |
224 innerRect.Shrink( KSelectorBorderWidth, KSelectorBorderWidth ); |
222 frameBrush->SetFrameRectsL(testInnerRect, testOuterRect); |
225 |
|
226 frameBrush->SetFrameRectsL( innerRect, outerRect ); |
223 |
227 |
224 return frameBrush; |
228 return frameBrush; |
225 } |
229 } |
226 |
230 |
227 // <cmail> |
231 // <cmail> |
233 // ----------------------------------------------------------------------------- |
237 // ----------------------------------------------------------------------------- |
234 // |
238 // |
235 CAlfFrameBrush* CFreestyleEmailUiTextureManager::NewListSelectorBrushL() |
239 CAlfFrameBrush* CFreestyleEmailUiTextureManager::NewListSelectorBrushL() |
236 { |
240 { |
237 FUNC_LOG; |
241 FUNC_LOG; |
238 if(!iNewFrameBrush) |
242 |
239 { |
243 if ( iNewFrameBrush ) |
240 iNewFrameBrush = CAlfFrameBrush::NewLC( *iEnv, KAknsIIDQsnFrList, -2, -1 ); |
244 { |
241 CleanupStack::Pop( iNewFrameBrush ); // frameBrush |
245 // A brush is already constructed. Do return it. |
242 const TRect testOuterRect(0,0,300,80); |
246 return iNewFrameBrush; |
243 TRect testInnerRect( testOuterRect ); |
247 } |
244 testInnerRect.Shrink( 10, 10 ); |
248 |
245 iNewFrameBrush->SetFrameRectsL(testInnerRect, testOuterRect); |
249 iNewFrameBrush = CAlfFrameBrush::NewL( *iEnv, KAknsIIDQsnFrList, |
246 } |
250 /* aEdgeOffsetX */ -2, |
|
251 /* aEdgeOffsetY */ -1 ); |
|
252 |
|
253 const TRect outerRect( 0, 0, 300, 80 ); |
|
254 TRect innerRect( outerRect ); |
|
255 innerRect.Shrink( 10, 10 ); |
|
256 |
|
257 iNewFrameBrush->SetFrameRectsL( innerRect, outerRect); |
|
258 |
247 return iNewFrameBrush; |
259 return iNewFrameBrush; |
248 } |
260 } |
249 // </cmail> |
261 // </cmail> |
250 |
262 |
251 |
263 |
631 TInt tempsize = iAppUi->LayoutHandler()->ListControlMenuIconSize(); |
643 TInt tempsize = iAppUi->LayoutHandler()->ListControlMenuIconSize(); |
632 iconSize.SetSize( tempsize, tempsize ); |
644 iconSize.SetSize( tempsize, tempsize ); |
633 scalemode = EAspectRatioNotPreserved; |
645 scalemode = EAspectRatioNotPreserved; |
634 } |
646 } |
635 break; |
647 break; |
|
648 case EListTextureNewEmailDefaultIcon: |
|
649 { |
|
650 TInt tempsize = iAppUi->LayoutHandler()->ListControlBarMailboxDefaultIconSize(); |
|
651 iconSize.SetSize( tempsize, tempsize ); |
|
652 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
653 EMbmFreestyleemailuiQgn_indi_tb_email_new, |
|
654 EMbmFreestyleemailuiQgn_indi_tb_email_new_mask ); |
|
655 } |
|
656 break; |
|
657 |
636 // MESSAGE TEXTURE READING STARTS HERE |
658 // MESSAGE TEXTURE READING STARTS HERE |
637 // |
659 // |
638 case EMessageReadIcon: |
660 case EMessageReadIcon: |
639 { |
661 { |
640 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
662 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
1281 EMbmFreestyleemailuiQgn_indi_cmail_drop_email_account_mask); |
1303 EMbmFreestyleemailuiQgn_indi_cmail_drop_email_account_mask); |
1282 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == EFolderListEmailAccountTexturePopup ); |
1304 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == EFolderListEmailAccountTexturePopup ); |
1283 } |
1305 } |
1284 break; |
1306 break; |
1285 |
1307 |
|
1308 // FOLDER LIST ICON READING STOPS HERE |
|
1309 // |
|
1310 |
|
1311 // SORT LIST ICON READING STARTS HERE |
|
1312 // |
|
1313 case ESortListAttachmentAscTexture: |
|
1314 { |
|
1315 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1316 EMbmFreestyleemailuiQgn_prop_email_sort_attach_asc, |
|
1317 EMbmFreestyleemailuiQgn_prop_email_sort_attach_asc_mask ); |
|
1318 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListAttachmentAscTexture ); |
|
1319 } |
|
1320 break; |
|
1321 case ESortListAttachmentDescTexture: |
|
1322 { |
|
1323 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1324 EMbmFreestyleemailuiQgn_prop_email_sort_attach_desc, |
|
1325 EMbmFreestyleemailuiQgn_prop_email_sort_attach_desc_mask ); |
|
1326 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListAttachmentDescTexture ); |
|
1327 } |
|
1328 break; |
|
1329 case ESortListDateAscTexture: |
|
1330 { |
|
1331 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1332 EMbmFreestyleemailuiQgn_prop_email_sort_date_asc, |
|
1333 EMbmFreestyleemailuiQgn_prop_email_sort_date_asc_mask ); |
|
1334 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListDateAscTexture ); |
|
1335 } |
|
1336 break; |
|
1337 case ESortListDateDescTexture: |
|
1338 { |
|
1339 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1340 EMbmFreestyleemailuiQgn_prop_email_sort_date_desc, |
|
1341 EMbmFreestyleemailuiQgn_prop_email_sort_date_desc_mask ); |
|
1342 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListDateDescTexture ); |
|
1343 } |
|
1344 break; |
|
1345 case ESortListFollowAscTexture: |
|
1346 { |
|
1347 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1348 EMbmFreestyleemailuiQgn_prop_email_sort_follow_asc, |
|
1349 EMbmFreestyleemailuiQgn_prop_email_sort_follow_asc_mask ); |
|
1350 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListFollowAscTexture ); |
|
1351 } |
|
1352 break; |
|
1353 case ESortListFollowDescTexture: |
|
1354 { |
|
1355 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1356 EMbmFreestyleemailuiQgn_prop_email_sort_follow_desc, |
|
1357 EMbmFreestyleemailuiQgn_prop_email_sort_follow_desc_mask ); |
|
1358 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListFollowDescTexture ); |
|
1359 } |
|
1360 break; |
|
1361 case ESortListPriorityAscTexture: |
|
1362 { |
|
1363 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1364 EMbmFreestyleemailuiQgn_prop_email_sort_priority_asc, |
|
1365 EMbmFreestyleemailuiQgn_prop_email_sort_priority_asc_mask ); |
|
1366 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListPriorityAscTexture ); |
|
1367 } |
|
1368 break; |
|
1369 case ESortListPriorityDescTexture: |
|
1370 { |
|
1371 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1372 EMbmFreestyleemailuiQgn_prop_email_sort_priority_desc, |
|
1373 EMbmFreestyleemailuiQgn_prop_email_sort_priority_desc_mask ); |
|
1374 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListPriorityDescTexture ); |
|
1375 } |
|
1376 break; |
|
1377 case ESortListSenderAscTexture: |
|
1378 { |
|
1379 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1380 EMbmFreestyleemailuiQgn_prop_email_sort_sender_asc, |
|
1381 EMbmFreestyleemailuiQgn_prop_email_sort_sender_asc_mask ); |
|
1382 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListSenderAscTexture ); |
|
1383 } |
|
1384 break; |
|
1385 case ESortListSenderDescTexture: |
|
1386 { |
|
1387 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1388 EMbmFreestyleemailuiQgn_prop_email_sort_sender_desc, |
|
1389 EMbmFreestyleemailuiQgn_prop_email_sort_sender_desc_mask ); |
|
1390 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListSenderDescTexture ); |
|
1391 } |
|
1392 break; |
|
1393 case ESortListSubjectAscTexture: |
|
1394 { |
|
1395 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1396 EMbmFreestyleemailuiQgn_prop_email_sort_subject_asc, |
|
1397 EMbmFreestyleemailuiQgn_prop_email_sort_subject_asc_mask ); |
|
1398 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListSubjectAscTexture ); |
|
1399 } |
|
1400 break; |
|
1401 case ESortListSubjectDescTexture: |
|
1402 { |
|
1403 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1404 EMbmFreestyleemailuiQgn_prop_email_sort_subject_desc, |
|
1405 EMbmFreestyleemailuiQgn_prop_email_sort_subject_desc_mask ); |
|
1406 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListSubjectDescTexture ); |
|
1407 } |
|
1408 break; |
|
1409 case ESortListUnreadAscTexture: |
|
1410 { |
|
1411 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1412 EMbmFreestyleemailuiQgn_prop_email_sort_unread_asc, |
|
1413 EMbmFreestyleemailuiQgn_prop_email_sort_unread_asc_mask ); |
|
1414 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListUnreadAscTexture ); |
|
1415 } |
|
1416 break; |
|
1417 case ESortListUnreadDescTexture: |
|
1418 { |
|
1419 AknIconUtils::CreateIconL( bitmap, mask, iconFileName, |
|
1420 EMbmFreestyleemailuiQgn_prop_email_sort_unread_desc, |
|
1421 EMbmFreestyleemailuiQgn_prop_email_sort_unread_desc_mask ); |
|
1422 iconSize = iAppUi->LayoutHandler()->FolderListIconSize( aId == ESortListUnreadDescTexture ); |
|
1423 } |
|
1424 break; |
|
1425 // SORT LIST ICON READING STOPS HERE |
|
1426 // |
|
1427 |
1286 // ATTACHMENT ICONS STARTS HERE |
1428 // ATTACHMENT ICONS STARTS HERE |
1287 // |
1429 // |
1288 //<cmail> |
1430 //<cmail> |
1289 case EAttachmentsDocFile: |
1431 case EAttachmentsDocFile: |
1290 { |
1432 { |
1773 iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EListTextureNodeCollapsed, this, EAlfTextureFlagSkinContent); |
1915 iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EListTextureNodeCollapsed, this, EAlfTextureFlagSkinContent); |
1774 } |
1916 } |
1775 break; |
1917 break; |
1776 case EListTextureControlButton: ; break; |
1918 case EListTextureControlButton: ; break; |
1777 case EListTextureMailboxDefaultIcon: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EListTextureMailboxDefaultIcon, this, EAlfTextureFlagDefault); break; |
1919 case EListTextureMailboxDefaultIcon: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EListTextureMailboxDefaultIcon, this, EAlfTextureFlagDefault); break; |
|
1920 case EListTextureNewEmailDefaultIcon: |
|
1921 { |
|
1922 iTextures[aTextureId] = |
|
1923 &CAlfStatic::Env().TextureManager().CreateTextureL( |
|
1924 EListTextureNewEmailDefaultIcon, this, |
|
1925 EAlfTextureFlagDefault ); |
|
1926 break; |
|
1927 } |
1778 case EListControlBarMailboxDefaultIcon: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EListControlBarMailboxDefaultIcon, this, EAlfTextureFlagDefault); break; |
1928 case EListControlBarMailboxDefaultIcon: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EListControlBarMailboxDefaultIcon, this, EAlfTextureFlagDefault); break; |
1779 case EBackgroundTextureViewerHeading: ; break; |
1929 case EBackgroundTextureViewerHeading: ; break; |
1780 case EBackgroundTextureBar: ; break; |
1930 case EBackgroundTextureBar: ; break; |
1781 case EBackgroundTextureThumb: ; break; |
1931 case EBackgroundTextureThumb: ; break; |
1782 case EBackgroundTextureMailList: |
1932 case EBackgroundTextureMailList: |
1913 case EFolderListSentTexturePopup: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EFolderListSentTexturePopup, this, EAlfTextureFlagRetainResolution); break; |
2063 case EFolderListSentTexturePopup: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EFolderListSentTexturePopup, this, EAlfTextureFlagRetainResolution); break; |
1914 case EFolderListDeletedItemsTexturePopup: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EFolderListDeletedItemsTexturePopup, this, EAlfTextureFlagRetainResolution); break; |
2064 case EFolderListDeletedItemsTexturePopup: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EFolderListDeletedItemsTexturePopup, this, EAlfTextureFlagRetainResolution); break; |
1915 case EFolderListServerFoldersTexturePopup: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EFolderListServerFoldersTexturePopup, this, EAlfTextureFlagRetainResolution); break; |
2065 case EFolderListServerFoldersTexturePopup: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EFolderListServerFoldersTexturePopup, this, EAlfTextureFlagRetainResolution); break; |
1916 case EFolderListEmailAccountTexturePopup: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EFolderListEmailAccountTexturePopup, this, EAlfTextureFlagRetainResolution); break; |
2066 case EFolderListEmailAccountTexturePopup: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EFolderListEmailAccountTexturePopup, this, EAlfTextureFlagRetainResolution); break; |
1917 |
2067 |
|
2068 // SORT LIST ICONS |
|
2069 case ESortListAttachmentAscTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListAttachmentAscTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2070 case ESortListAttachmentDescTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListAttachmentDescTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2071 case ESortListDateAscTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListDateAscTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2072 case ESortListDateDescTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListDateDescTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2073 case ESortListFollowAscTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListFollowAscTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2074 case ESortListFollowDescTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListFollowDescTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2075 case ESortListPriorityAscTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListPriorityAscTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2076 case ESortListPriorityDescTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListPriorityDescTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2077 case ESortListSenderAscTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListSenderAscTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2078 case ESortListSenderDescTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListSenderDescTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2079 case ESortListSubjectAscTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListSubjectAscTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2080 case ESortListSubjectDescTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListSubjectDescTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2081 case ESortListUnreadAscTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListUnreadAscTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2082 case ESortListUnreadDescTexture: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( ESortListUnreadDescTexture, this, EAlfTextureFlagRetainResolution); break; |
|
2083 |
1918 // STATUS INDICATOR ICONS |
2084 // STATUS INDICATOR ICONS |
1919 case EStatusTextureSynchronising: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EStatusTextureSynchronising, this, EAlfTextureFlagRetainResolution); break; |
2085 case EStatusTextureSynchronising: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EStatusTextureSynchronising, this, EAlfTextureFlagRetainResolution); break; |
1920 case EStatusTextureConnected: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EStatusTextureConnected, this, EAlfTextureFlagRetainResolution); break; |
2086 case EStatusTextureConnected: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EStatusTextureConnected, this, EAlfTextureFlagRetainResolution); break; |
1921 case EStatusTextureConnecting: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EStatusTextureConnecting, this, EAlfTextureFlagRetainResolution); break; |
2087 case EStatusTextureConnecting: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EStatusTextureConnecting, this, EAlfTextureFlagRetainResolution); break; |
1922 case EStatusTextureDisconnectedGeneral: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EStatusTextureDisconnectedGeneral, this, EAlfTextureFlagRetainResolution); break; |
2088 case EStatusTextureDisconnectedGeneral: iTextures[aTextureId] = &CAlfStatic::Env().TextureManager().CreateTextureL( EStatusTextureDisconnectedGeneral, this, EAlfTextureFlagRetainResolution); break; |