225 TAlfTimedPoint tpMainIconTl, tpMainIconBr; |
225 TAlfTimedPoint tpMainIconTl, tpMainIconBr; |
226 TAlfTimedPoint tpTextTl, tpTextBr; |
226 TAlfTimedPoint tpTextTl, tpTextBr; |
227 TAlfTimedPoint tpMarkIconTl, tpMarkIconBr; |
227 TAlfTimedPoint tpMarkIconTl, tpMarkIconBr; |
228 TAlfTimedPoint tpMenuIconTl, tpMenuIconBr; |
228 TAlfTimedPoint tpMenuIconTl, tpMenuIconBr; |
229 |
229 |
230 // <cmail> Platform layout change |
|
231 /*CFsLayoutManager::TFsLayoutMetrics |
|
232 mainIconMetrics = CFsLayoutManager::EFsLmListMediumLineG3G1, |
|
233 markIconMetrics = CFsLayoutManager::EFsLmListMediumLineG3G2, |
|
234 menuIconMetrics = CFsLayoutManager::EFsLmListMediumLineG3G3, |
|
235 textMetrics = CFsLayoutManager::EFsLmListMediumLineG3T1, |
|
236 sizeMetrics = CFsLayoutManager::EFsLmListSingleDycRowPane;*/ |
|
237 |
|
238 |
|
239 CFsLayoutManager::TFsLayoutMetrics mainIconMetrics = |
230 CFsLayoutManager::TFsLayoutMetrics mainIconMetrics = |
240 CFsLayoutManager::EFsLmListSingleDycRowPaneG1; |
231 CFsLayoutManager::EFsLmListSingleDycRowPaneG1; |
241 CFsLayoutManager::TFsLayoutMetrics markIconMetrics = |
232 CFsLayoutManager::TFsLayoutMetrics markIconMetrics = |
242 CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
233 CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
243 CFsLayoutManager::TFsLayoutMetrics menuIconMetrics = |
234 CFsLayoutManager::TFsLayoutMetrics menuIconMetrics = |
247 |
238 |
248 TInt mainIconVariety( 0 ); |
239 TInt mainIconVariety( 0 ); |
249 TInt markIconVariety( 0 ); |
240 TInt markIconVariety( 0 ); |
250 TInt menuIconVariety( 0 ); |
241 TInt menuIconVariety( 0 ); |
251 TInt textPaneVariety( 0 ); |
242 TInt textPaneVariety( 0 ); |
252 // </cmail> Platform layout change |
|
253 |
243 |
254 if (aData->IsIconCollapsedSet()) |
244 if (aData->IsIconCollapsedSet()) |
255 { |
245 { |
256 if (iFlags & KFsTreeListItemMarked) |
246 if (iFlags & KFsTreeListItemMarked) |
257 { |
247 { |
258 if ((iFlags & KFsTreeListItemHasMenu) |
248 if ((iFlags & KFsTreeListItemHasMenu) |
259 && (iFlags & KFsTreeListItemFocused)) |
249 && (iFlags & KFsTreeListItemFocused)) |
260 { |
250 { |
261 // <cmail> Platform layout change |
|
262 //mainIcon + markIcon + menuIcon |
251 //mainIcon + markIcon + menuIcon |
263 //the metrics defined when declared |
252 //the metrics defined when declared |
264 mainIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG1; |
253 mainIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG1; |
265 menuIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG3; |
254 menuIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG3; |
266 markIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
255 markIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
267 mainIconVariety = 3; |
256 mainIconVariety = 3; |
268 textPaneVariety = 3; |
257 textPaneVariety = 3; |
269 menuIconVariety = 1; |
258 menuIconVariety = 1; |
270 markIconVariety = 2; |
259 markIconVariety = 2; |
271 // </cmail> Platform layout change |
|
272 } |
260 } |
273 else |
261 else |
274 { |
262 { |
275 // <cmail> Platform layout change |
|
276 //mainIcon + markIcon |
263 //mainIcon + markIcon |
277 /* |
|
278 mainIconMetrics = CFsLayoutManager::EFsLmListMediumLineG2G1; |
|
279 markIconMetrics = CFsLayoutManager::EFsLmListMediumLineG2G2; |
|
280 textMetrics = CFsLayoutManager::EFsLmListMediumLineG2T1; |
|
281 */ |
|
282 mainIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG1; |
264 mainIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG1; |
283 markIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
265 markIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
284 mainIconVariety = 4; |
266 mainIconVariety = 4; |
285 textPaneVariety = 4; |
267 textPaneVariety = 4; |
286 markIconVariety = 3; |
268 markIconVariety = 3; |
287 // </cmail> Platform layout change |
|
288 } |
269 } |
289 } |
270 } |
290 else |
271 else |
291 { |
272 { |
292 if ((iFlags & KFsTreeListItemHasMenu) |
273 if ((iFlags & KFsTreeListItemHasMenu) |
293 && (iFlags & KFsTreeListItemFocused)) |
274 && (iFlags & KFsTreeListItemFocused)) |
294 { |
275 { |
295 // <cmail> Platform layout change |
|
296 //mainIcon + menuIcon |
276 //mainIcon + menuIcon |
297 /*mainIconMetrics = CFsLayoutManager::EFsLmListMediumLineG2G1; |
|
298 menuIconMetrics = CFsLayoutManager::EFsLmListMediumLineG2G2; |
|
299 textMetrics = CFsLayoutManager::EFsLmListMediumLineG2T1;*/ |
|
300 mainIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG1; |
277 mainIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG1; |
301 menuIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
278 menuIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
302 mainIconVariety = 4; |
279 mainIconVariety = 4; |
303 textPaneVariety = 4; |
280 textPaneVariety = 4; |
304 menuIconVariety = 3; |
281 menuIconVariety = 3; |
305 // </cmail> Platform layout change |
|
306 } |
282 } |
307 else |
283 else |
308 { |
284 { |
309 if ( IsLayoutHintSet( EFolderLayout ) ) |
285 if ( IsLayoutHintSet( EFolderLayout ) ) |
310 { |
286 { |
332 if (iFlags & KFsTreeListItemMarked) |
303 if (iFlags & KFsTreeListItemMarked) |
333 { |
304 { |
334 if ((iFlags & KFsTreeListItemHasMenu) |
305 if ((iFlags & KFsTreeListItemHasMenu) |
335 && (iFlags & KFsTreeListItemFocused)) |
306 && (iFlags & KFsTreeListItemFocused)) |
336 { |
307 { |
337 // <cmail> Platform layout change |
|
338 //markIcon + menuIcon |
308 //markIcon + menuIcon |
339 /* |
|
340 markIconMetrics = |
|
341 CFsLayoutManager::EFsLmListMediumLineRightIconx2G1; |
|
342 menuIconMetrics = |
|
343 CFsLayoutManager::EFsLmListMediumLineRightIconx2G2; |
|
344 textMetrics = |
|
345 CFsLayoutManager::EFsLmListMediumLineRightIconx2T1;*/ |
|
346 menuIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG3; |
309 menuIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG3; |
347 markIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
310 markIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
348 menuIconVariety = 2; |
311 menuIconVariety = 2; |
349 markIconVariety = 4; |
312 markIconVariety = 4; |
350 textPaneVariety = 6; |
313 textPaneVariety = 6; |
351 // </cmail> Platform layout change |
|
352 } |
314 } |
353 else |
315 else |
354 { |
316 { |
355 // <cmail> Platform layout change |
|
356 //markIcon |
317 //markIcon |
357 /* |
|
358 markIconMetrics = |
|
359 CFsLayoutManager::EFsLmListMediumLineRightIconG1; |
|
360 textMetrics = |
|
361 CFsLayoutManager::EFsLmListMediumLineRightIconT1;*/ |
|
362 markIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
318 markIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
363 markIconVariety = 5; |
319 markIconVariety = 5; |
364 textPaneVariety = 7; |
320 textPaneVariety = 7; |
365 // </cmail> Platform layout change |
|
366 } |
321 } |
367 } |
322 } |
368 else |
323 else |
369 { |
324 { |
370 if ((iFlags & KFsTreeListItemHasMenu) |
325 if ((iFlags & KFsTreeListItemHasMenu) |
371 && (iFlags & KFsTreeListItemFocused)) |
326 && (iFlags & KFsTreeListItemFocused)) |
372 { |
327 { |
373 // <cmail> Platform layout change |
|
374 //menuIcon |
328 //menuIcon |
375 /* |
|
376 menuIconMetrics = |
|
377 CFsLayoutManager::EFsLmListMediumLineRightIconG1; |
|
378 textMetrics = |
|
379 CFsLayoutManager::EFsLmListMediumLineRightIconT1;*/ |
|
380 menuIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
329 menuIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4; |
381 menuIconVariety = 5; |
330 menuIconVariety = 5; |
382 textPaneVariety = 7; |
331 textPaneVariety = 7; |
383 // </cmail> Platform layout change |
|
384 } |
332 } |
385 else |
333 else |
386 { |
334 { |
387 // <cmail> Platform layout change |
|
388 //plain item |
335 //plain item |
389 /*textMetrics = |
|
390 CFsLayoutManager::EFsLmListMediumLinePlainT1;*/ |
|
391 textPaneVariety = 8; |
336 textPaneVariety = 8; |
392 // </cmail> Platform layout change |
|
393 } |
337 } |
394 } |
338 } |
395 } |
339 } |
396 //layout manager is queried for medium values - LM returnes rects based on phone's global text settings |
340 //layout manager is queried for medium values - LM returnes rects based on phone's global text settings |
397 |
341 |
398 TRect parentLayoutRect = TRect(iParentLayout->Size().Target().AsSize()); |
342 TRect parentLayoutRect = TRect(iParentLayout->Size().Target().AsSize()); |
399 parentLayoutRect.Resize(-(iParentLayout->HorizontalPadding()*2), 0); |
343 parentLayoutRect.Resize(-(iParentLayout->HorizontalPadding()*2), 0); |
400 |
344 |
401 if (iFlags & KFsTreeListItemManagedLayout) |
345 if (iFlags & KFsTreeListItemManagedLayout) |
402 { |
346 { |
403 // <cmail> Platform layout change |
|
404 /*CFsLayoutManager::LayoutMetricsSize( |
|
405 parentLayoutRect, |
|
406 sizeMetrics, |
|
407 iSize );*/ |
|
408 CFsLayoutManager::LayoutMetricsSize( |
347 CFsLayoutManager::LayoutMetricsSize( |
409 parentLayoutRect, |
348 parentLayoutRect, |
410 CFsLayoutManager::EFsLmListSingleFsDycPane, |
349 CFsLayoutManager::EFsLmListSingleFsDycPane, |
411 iSize ); |
350 iSize ); |
412 // </cmail> Platform layout change |
|
413 } |
351 } |
414 |
352 |
415 //one line node is not extendable |
353 //one line node is not extendable |
416 TRect currentSize = iSize; |
354 TRect currentSize = iSize; |
417 if ( !IsLayoutHintSet( EFolderLayout ) ) |
355 if ( !IsLayoutHintSet( EFolderLayout ) ) |
426 { |
364 { |
427 currentSize.iTl = currentSize.iTl + TPoint(aIndentation, 0); |
365 currentSize.iTl = currentSize.iTl + TPoint(aIndentation, 0); |
428 } |
366 } |
429 |
367 |
430 |
368 |
431 // <cmail> Platform layout change |
|
432 /*CFsLayoutManager::LayoutMetricsRect( |
|
433 currentSize, |
|
434 mainIconMetrics, |
|
435 rect );*/ |
|
436 CFsLayoutManager::LayoutMetricsRect( |
369 CFsLayoutManager::LayoutMetricsRect( |
437 currentSize, |
370 currentSize, |
438 mainIconMetrics, |
371 mainIconMetrics, |
439 rect, |
372 rect, |
440 mainIconVariety ); |
373 mainIconVariety ); |
441 // </cmail> Platform layout change |
374 // WORKAROUND FIX FOR LAYOUT PROBLEM -- RETURN THIS TO NORMAL WHEN LAYOUT'S ARE OK |
|
375 if (rect.iTl.iY < 15) |
|
376 { |
|
377 rect.Move(0, 15 - rect.iTl.iY); |
|
378 } |
|
379 // WORKAROUND FIX FOR LAYOUT PROBLEM -- RETURN THIS TO NORMAL WHEN LAYOUT'S ARE OK |
442 tpMainIconTl.SetTarget(TAlfRealPoint(rect.iTl)); |
380 tpMainIconTl.SetTarget(TAlfRealPoint(rect.iTl)); |
443 tpMainIconBr.SetTarget(TAlfRealPoint(rect.iBr)); |
381 tpMainIconBr.SetTarget(TAlfRealPoint(rect.iBr)); |
444 |
382 |
445 // <cmail> Platform layout change |
|
446 /*CFsLayoutManager::LayoutMetricsRect( |
|
447 currentSize, |
|
448 markIconMetrics, |
|
449 rect );*/ |
|
450 CFsLayoutManager::LayoutMetricsRect( |
383 CFsLayoutManager::LayoutMetricsRect( |
451 currentSize, |
384 currentSize, |
452 markIconMetrics, |
385 markIconMetrics, |
453 rect, |
386 rect, |
454 markIconVariety ); |
387 markIconVariety ); |
455 // </cmail> Platform layout change |
388 // WORKAROUND FIX FOR LAYOUT PROBLEM -- RETURN THIS TO NORMAL WHEN LAYOUT'S ARE OK |
|
389 if (rect.iTl.iY < 15) |
|
390 { |
|
391 rect.Move(0, 15 - rect.iTl.iY); |
|
392 } |
|
393 // WORKAROUND FIX FOR LAYOUT PROBLEM -- RETURN THIS TO NORMAL WHEN LAYOUT'S ARE OK |
456 tpMarkIconTl.SetTarget(TAlfRealPoint(rect.iTl)); |
394 tpMarkIconTl.SetTarget(TAlfRealPoint(rect.iTl)); |
457 tpMarkIconBr.SetTarget(TAlfRealPoint(rect.iBr)); |
395 tpMarkIconBr.SetTarget(TAlfRealPoint(rect.iBr)); |
458 |
396 |
459 // <cmail> Platform layout change |
|
460 /*CFsLayoutManager::LayoutMetricsRect( |
|
461 currentSize, |
|
462 menuIconMetrics, |
|
463 rect );*/ |
|
464 CFsLayoutManager::LayoutMetricsRect( |
397 CFsLayoutManager::LayoutMetricsRect( |
465 currentSize, |
398 currentSize, |
466 menuIconMetrics, |
399 menuIconMetrics, |
467 rect, |
400 rect, |
468 menuIconVariety ); |
401 menuIconVariety ); |
469 // </cmail> Platform layout change |
402 // WORKAROUND FIX FOR LAYOUT PROBLEM -- RETURN THIS TO NORMAL WHEN LAYOUT'S ARE OK |
|
403 if (rect.iTl.iY < 15) |
|
404 { |
|
405 rect.Move(0, 15 - rect.iTl.iY); |
|
406 } |
|
407 // WORKAROUND FIX FOR LAYOUT PROBLEM -- RETURN THIS TO NORMAL WHEN LAYOUT'S ARE OK |
470 tpMenuIconTl.SetTarget(TAlfRealPoint(rect.iTl)); |
408 tpMenuIconTl.SetTarget(TAlfRealPoint(rect.iTl)); |
471 tpMenuIconBr.SetTarget(TAlfRealPoint(rect.iBr)); |
409 tpMenuIconBr.SetTarget(TAlfRealPoint(rect.iBr)); |
472 |
410 |
473 // <cmail> Platform layout change |
|
474 TRect textRect( currentSize ); |
411 TRect textRect( currentSize ); |
475 if (textMetrics == CFsLayoutManager::EFsLmListSingleDycRowTextPaneT1) |
412 if (textMetrics == CFsLayoutManager::EFsLmListSingleDycRowTextPaneT1) |
476 { |
413 { |
477 CFsLayoutManager::LayoutMetricsRect( |
414 CFsLayoutManager::LayoutMetricsRect( |
478 currentSize, |
415 currentSize, |
480 textRect, |
417 textRect, |
481 textPaneVariety ); |
418 textPaneVariety ); |
482 } |
419 } |
483 |
420 |
484 CFsLayoutManager::TFsText textInfo; |
421 CFsLayoutManager::TFsText textInfo; |
485 /*CFsLayoutManager::LayoutMetricsText(currentSize, textMetrics, textInfo, |
|
486 textVariety);*/ |
|
487 |
|
488 CFsLayoutManager::LayoutMetricsText(textRect, |
422 CFsLayoutManager::LayoutMetricsText(textRect, |
489 textMetrics, textInfo, textPaneVariety); |
423 textMetrics, textInfo, textPaneVariety); |
490 // </cmail> Platform layout change |
424 // WORKAROUND FIX FOR LAYOUT PROBLEM -- RETURN THIS TO NORMAL WHEN LAYOUT'S ARE OK |
491 |
425 if (textInfo.iTextRect.iTl.iY < 15) |
492 tpTextTl.SetTarget(TAlfRealPoint(textInfo.iTextRect.iTl)); |
426 { |
|
427 textInfo.iTextRect.Move(0, 15 - textInfo.iTextRect.iTl.iY); |
|
428 } |
|
429 // WORKAROUND FIX FOR LAYOUT PROBLEM -- RETURN THIS TO NORMAL WHEN LAYOUT'S ARE OK |
|
430 tpTextTl.SetTarget(TAlfRealPoint(textInfo.iTextRect.iTl)); |
493 tpTextBr.SetTarget(TAlfRealPoint(textInfo.iTextRect.iBr)); |
431 tpTextBr.SetTarget(TAlfRealPoint(textInfo.iTextRect.iBr)); |
494 |
432 |
495 TInt visualIconIndex = iLayout->FindVisual(iIconVisual); |
433 TInt visualIconIndex = iLayout->FindVisual(iIconVisual); |
496 if ( visualIconIndex != KErrNotFound ) |
434 if ( visualIconIndex != KErrNotFound ) |
497 { |
435 { |