equal
deleted
inserted
replaced
343 } |
343 } |
344 |
344 |
345 CMIDControlItem::FocusChanged(aDrawNow); |
345 CMIDControlItem::FocusChanged(aDrawNow); |
346 // DoLayout and change text color when focused |
346 // DoLayout and change text color when focused |
347 SizeChanged(); |
347 SizeChanged(); |
|
348 TRAP_IGNORE(UpdateTextColorsL()); |
348 } |
349 } |
349 |
350 |
350 void CMIDTextFieldItem::HandleCurrentL(TBool aCurrent) |
351 void CMIDTextFieldItem::HandleCurrentL(TBool aCurrent) |
351 { |
352 { |
352 // set initial input modes when TextField becomes the focused item |
353 // set initial input modes when TextField becomes the focused item |
670 TRAP_IGNORE(iTextField->TextView()->SetCursorVisibilityL(TCursor::EFCursorInvisible, |
671 TRAP_IGNORE(iTextField->TextView()->SetCursorVisibilityL(TCursor::EFCursorInvisible, |
671 textCursor)); |
672 textCursor)); |
672 } |
673 } |
673 } |
674 } |
674 |
675 |
|
676 void CMIDTextFieldItem::UpdateTextColorsL() |
|
677 { |
|
678 if (iTextField) |
|
679 { |
|
680 // Set color for content text according to item highlight |
|
681 // (logical color constants are defined in lcdui.h) |
|
682 if (iHighlighted) |
|
683 { |
|
684 // Text colour from skin - highlighted |
|
685 iTextField->SetTextSkinColorIdL(KHighlightedItemTextColor); |
|
686 } |
|
687 else |
|
688 { |
|
689 // Text colour from skin - unfocused |
|
690 iTextField->SetTextSkinColorIdL(KNonHighlightedItemTextColor); |
|
691 } |
|
692 } |
|
693 } |