equal
deleted
inserted
replaced
160 CFbsBitmap* bmp = NULL; |
160 CFbsBitmap* bmp = NULL; |
161 CFbsBitmap* maskbmp = NULL; |
161 CFbsBitmap* maskbmp = NULL; |
162 |
162 |
163 if (bmpMskId != KInvalidBmp) |
163 if (bmpMskId != KInvalidBmp) |
164 { |
164 { |
165 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
165 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
166 id, |
166 id, |
167 bmp, |
167 bmp, |
168 maskbmp, |
168 maskbmp, |
169 bmpFileName, |
169 bmpFileName, |
170 bmpId, |
170 bmpId, |
174 SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); |
174 SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); |
175 iMaskBmpList.Append(maskbmp); |
175 iMaskBmpList.Append(maskbmp); |
176 } |
176 } |
177 else |
177 else |
178 { |
178 { |
179 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
179 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
180 id, |
180 id, |
181 bmp, |
181 bmp, |
182 bmpFileName, |
182 bmpFileName, |
183 bmpId); |
183 bmpId); |
184 } |
184 } |
241 CFbsBitmap* bmp = NULL; |
241 CFbsBitmap* bmp = NULL; |
242 CFbsBitmap* maskbmp = NULL; |
242 CFbsBitmap* maskbmp = NULL; |
243 |
243 |
244 if (bmpMskId != KInvalidBmp) |
244 if (bmpMskId != KInvalidBmp) |
245 { |
245 { |
246 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
246 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
247 id, |
247 id, |
248 bmp, |
248 bmp, |
249 maskbmp, |
249 maskbmp, |
250 bmpFileName, |
250 bmpFileName, |
251 bmpId, |
251 bmpId, |
255 SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); |
255 SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); |
256 iMaskBmpList.Append(maskbmp); |
256 iMaskBmpList.Append(maskbmp); |
257 } |
257 } |
258 else |
258 else |
259 { |
259 { |
260 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
260 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
261 id, |
261 id, |
262 bmp, |
262 bmp, |
263 bmpFileName, |
263 bmpFileName, |
264 bmpId); |
264 bmpId); |
265 } |
265 } |
546 CFbsBitmap* bmp = NULL; |
546 CFbsBitmap* bmp = NULL; |
547 CFbsBitmap* maskbmp = NULL; |
547 CFbsBitmap* maskbmp = NULL; |
548 |
548 |
549 if (bmpMskId != KInvalidBmp) |
549 if (bmpMskId != KInvalidBmp) |
550 { |
550 { |
551 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
551 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
552 id, |
552 id, |
553 bmp, |
553 bmp, |
554 maskbmp, |
554 maskbmp, |
555 bmpFileName, |
555 bmpFileName, |
556 bmpId, |
556 bmpId, |
559 SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); |
559 SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); |
560 iMaskBmpList.Append(maskbmp); |
560 iMaskBmpList.Append(maskbmp); |
561 } |
561 } |
562 else |
562 else |
563 { |
563 { |
564 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
564 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
565 id, |
565 id, |
566 bmp, |
566 bmp, |
567 bmpFileName, |
567 bmpFileName, |
568 bmpId); |
568 bmpId); |
569 } |
569 } |
602 { |
602 { |
603 if (bmpMskId != KInvalidBmp) |
603 if (bmpMskId != KInvalidBmp) |
604 { |
604 { |
605 if( colorGroup == KInvalidColorGroup ) |
605 if( colorGroup == KInvalidColorGroup ) |
606 { |
606 { |
607 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
607 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
608 id, |
608 id, |
609 iForgroundBmp, |
609 iForgroundBmp, |
610 iForgroundBmpMask, |
610 iForgroundBmpMask, |
611 bmpFileName, |
611 bmpFileName, |
612 bmpId, |
612 bmpId, |
613 bmpMskId); |
613 bmpMskId); |
614 } |
614 } |
615 else |
615 else |
616 { |
616 { |
617 AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), |
617 AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(), |
618 id, |
618 id, |
619 KAknsIIDQsnIconColors, |
619 KAknsIIDQsnIconColors, |
620 colorGroup, |
620 colorGroup, |
621 iForgroundBmp, |
621 iForgroundBmp, |
622 iForgroundBmpMask, |
622 iForgroundBmpMask, |
635 AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), |
635 AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), |
636 EAspectRatioNotPreserved);*/ |
636 EAspectRatioNotPreserved);*/ |
637 } |
637 } |
638 else |
638 else |
639 { |
639 { |
640 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
640 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
641 id, |
641 id, |
642 iForgroundBmp, |
642 iForgroundBmp, |
643 bmpFileName, |
643 bmpFileName, |
644 bmpId); |
644 bmpId); |
645 AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); |
645 AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); |
697 CFbsBitmap* bmp = NULL; |
697 CFbsBitmap* bmp = NULL; |
698 CFbsBitmap* maskbmp = NULL; |
698 CFbsBitmap* maskbmp = NULL; |
699 |
699 |
700 if (bmpMskId != KInvalidBmp) |
700 if (bmpMskId != KInvalidBmp) |
701 { |
701 { |
702 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
702 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
703 id, |
703 id, |
704 bmp, |
704 bmp, |
705 maskbmp, |
705 maskbmp, |
706 bmpFileName, |
706 bmpFileName, |
707 bmpId, |
707 bmpId, |
710 SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); |
710 SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); |
711 iMaskBmpList.Append(maskbmp); |
711 iMaskBmpList.Append(maskbmp); |
712 } |
712 } |
713 else |
713 else |
714 { |
714 { |
715 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
715 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
716 id, |
716 id, |
717 bmp, |
717 bmp, |
718 bmpFileName, |
718 bmpFileName, |
719 bmpId); |
719 bmpId); |
720 } |
720 } |
764 { |
764 { |
765 if (bmpMskId != KInvalidBmp) |
765 if (bmpMskId != KInvalidBmp) |
766 { |
766 { |
767 if( colorGroup == KInvalidColorGroup ) |
767 if( colorGroup == KInvalidColorGroup ) |
768 { |
768 { |
769 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
769 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
770 id, |
770 id, |
771 iForgroundBmp, |
771 iForgroundBmp, |
772 iForgroundBmpMask, |
772 iForgroundBmpMask, |
773 bmpFileName, |
773 bmpFileName, |
774 bmpId, |
774 bmpId, |
775 bmpMskId); |
775 bmpMskId); |
776 } |
776 } |
777 else |
777 else |
778 { |
778 { |
779 AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), |
779 AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(), |
780 id, |
780 id, |
781 KAknsIIDQsnIconColors, |
781 KAknsIIDQsnIconColors, |
782 colorGroup, |
782 colorGroup, |
783 iForgroundBmp, |
783 iForgroundBmp, |
784 iForgroundBmpMask, |
784 iForgroundBmpMask, |
796 AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), |
796 AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), |
797 EAspectRatioNotPreserved);*/ |
797 EAspectRatioNotPreserved);*/ |
798 } |
798 } |
799 else |
799 else |
800 { |
800 { |
801 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
801 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
802 id, |
802 id, |
803 iForgroundBmp, |
803 iForgroundBmp, |
804 bmpFileName, |
804 bmpFileName, |
805 bmpId); |
805 bmpId); |
806 AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); |
806 AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); |
981 CFbsBitmap* bmpMask = NULL; |
981 CFbsBitmap* bmpMask = NULL; |
982 |
982 |
983 // Draw background |
983 // Draw background |
984 if( IsDimmed() ) // Dimmed state |
984 if( IsDimmed() ) // Dimmed state |
985 { |
985 { |
986 AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), |
986 AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), |
987 *gc, |
987 *gc, |
988 rect, |
988 rect, |
989 innerRect, |
989 innerRect, |
990 iInactiveImgID, |
990 iInactiveImgID, |
991 KAknsIIDDefault ); |
991 KAknsIIDDefault ); |
1002 } |
1002 } |
1003 else |
1003 else |
1004 { |
1004 { |
1005 // Normal state or pressed state |
1005 // Normal state or pressed state |
1006 TAknsItemID ImgID = (IsDragging() | PointerDown()) ? iPressedImgID : iNormalImgID; |
1006 TAknsItemID ImgID = (IsDragging() | PointerDown()) ? iPressedImgID : iNormalImgID; |
1007 AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), |
1007 AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), |
1008 *gc, |
1008 *gc, |
1009 rect, |
1009 rect, |
1010 innerRect, |
1010 innerRect, |
1011 ImgID, |
1011 ImgID, |
1012 KAknsIIDDefault ); |
1012 KAknsIIDDefault ); |
1232 TInt shadowtextcoloridx = aReader.ReadInt16(); |
1232 TInt shadowtextcoloridx = aReader.ReadInt16(); |
1233 |
1233 |
1234 TAknsItemID id; |
1234 TAknsItemID id; |
1235 |
1235 |
1236 id.Set(TInt(colorMajorSkinId), skinitemid); |
1236 id.Set(TInt(colorMajorSkinId), skinitemid); |
1237 TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), |
1237 TInt error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(), |
1238 iFontColor, |
1238 iFontColor, |
1239 id, |
1239 id, |
1240 textcoloridx); |
1240 textcoloridx); |
1241 |
1241 |
1242 if (error != KErrNone) |
1242 if (error != KErrNone) |
1244 iFontColor = TRgb(KDefaultTextColor); |
1244 iFontColor = TRgb(KDefaultTextColor); |
1245 } |
1245 } |
1246 |
1246 |
1247 SetFontColor(iFontColor); |
1247 SetFontColor(iFontColor); |
1248 |
1248 |
1249 error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), |
1249 error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(), |
1250 iShadowFontColor, |
1250 iShadowFontColor, |
1251 id, |
1251 id, |
1252 shadowtextcoloridx); |
1252 shadowtextcoloridx); |
1253 |
1253 |
1254 if (error != KErrNone) |
1254 if (error != KErrNone) |
1335 TInt shadowtextcoloridx = reader.ReadInt16(); |
1335 TInt shadowtextcoloridx = reader.ReadInt16(); |
1336 |
1336 |
1337 TAknsItemID id; |
1337 TAknsItemID id; |
1338 |
1338 |
1339 id.Set(TInt(colorMajorSkinId), skinitemid); |
1339 id.Set(TInt(colorMajorSkinId), skinitemid); |
1340 TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), |
1340 TInt error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(), |
1341 iFontColor, |
1341 iFontColor, |
1342 id, |
1342 id, |
1343 textcoloridx); |
1343 textcoloridx); |
1344 |
1344 |
1345 if (error != KErrNone) |
1345 if (error != KErrNone) |
1347 iFontColor = TRgb(KDefaultTextColor); |
1347 iFontColor = TRgb(KDefaultTextColor); |
1348 } |
1348 } |
1349 |
1349 |
1350 SetFontColor(iFontColor); |
1350 SetFontColor(iFontColor); |
1351 |
1351 |
1352 error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), |
1352 error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(), |
1353 iShadowFontColor, |
1353 iShadowFontColor, |
1354 id, |
1354 id, |
1355 shadowtextcoloridx); |
1355 shadowtextcoloridx); |
1356 |
1356 |
1357 if (error != KErrNone) |
1357 if (error != KErrNone) |
1450 |
1450 |
1451 if (bmpMskId != KInvalidBmp) |
1451 if (bmpMskId != KInvalidBmp) |
1452 { |
1452 { |
1453 if( colorGroup == KInvalidColorGroup ) |
1453 if( colorGroup == KInvalidColorGroup ) |
1454 { |
1454 { |
1455 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
1455 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
1456 id, |
1456 id, |
1457 bmp, |
1457 bmp, |
1458 maskbmp, |
1458 maskbmp, |
1459 bmpFileName, |
1459 bmpFileName, |
1460 bmpId, |
1460 bmpId, |
1461 bmpMskId); |
1461 bmpMskId); |
1462 } |
1462 } |
1463 else |
1463 else |
1464 { |
1464 { |
1465 AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), |
1465 AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(), |
1466 id, |
1466 id, |
1467 KAknsIIDQsnIconColors, |
1467 KAknsIIDQsnIconColors, |
1468 colorGroup, |
1468 colorGroup, |
1469 bmp, |
1469 bmp, |
1470 maskbmp, |
1470 maskbmp, |
1481 CleanupStack::Pop(maskbmp); |
1481 CleanupStack::Pop(maskbmp); |
1482 |
1482 |
1483 } |
1483 } |
1484 else |
1484 else |
1485 { |
1485 { |
1486 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
1486 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
1487 id, |
1487 id, |
1488 bmp, |
1488 bmp, |
1489 bmpFileName, |
1489 bmpFileName, |
1490 bmpId); |
1490 bmpId); |
1491 |
1491 |
1932 // (other items were commented in a header). |
1932 // (other items were commented in a header). |
1933 // ----------------------------------------------------------------------------- |
1933 // ----------------------------------------------------------------------------- |
1934 // |
1934 // |
1935 void CAknFepCtrlMultiModeButton::GetRangeListL(RArray<TInt>& aList) |
1935 void CAknFepCtrlMultiModeButton::GetRangeListL(RArray<TInt>& aList) |
1936 { |
1936 { |
|
1937 CleanupClosePushL( aList ); |
1937 for (TInt i = 0; i < NumberOfModes(); i++) |
1938 for (TInt i = 0; i < NumberOfModes(); i++) |
1938 { |
1939 { |
1939 if (aList.Find(iModesList[i]->iRangeId) == KErrNotFound) |
1940 if (aList.Find(iModesList[i]->iRangeId) == KErrNotFound) |
1940 { |
1941 { |
1941 aList.AppendL(iModesList[i]->iRangeId); |
1942 aList.AppendL(iModesList[i]->iRangeId); |
1942 } |
1943 } |
1943 } |
1944 } |
|
1945 CleanupStack::Pop(); |
1944 } |
1946 } |
1945 |
1947 |
1946 // ----------------------------------------------------------------------------- |
1948 // ----------------------------------------------------------------------------- |
1947 // CAknFepCtrlMultiModeButton::DuplicateBitmapL |
1949 // CAknFepCtrlMultiModeButton::DuplicateBitmapL |
1948 // (other items were commented in a header). |
1950 // (other items were commented in a header). |
2842 { |
2844 { |
2843 if (bmpMskId != KInvalidBmp) |
2845 if (bmpMskId != KInvalidBmp) |
2844 { |
2846 { |
2845 if( colorGroup == KInvalidColorGroup ) |
2847 if( colorGroup == KInvalidColorGroup ) |
2846 { |
2848 { |
2847 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
2849 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
2848 id, |
2850 id, |
2849 iForgroundBmp, |
2851 iForgroundBmp, |
2850 iForgroundBmpMask, |
2852 iForgroundBmpMask, |
2851 bmpFileName, |
2853 bmpFileName, |
2852 bmpId, |
2854 bmpId, |
2853 bmpMskId); |
2855 bmpMskId); |
2854 } |
2856 } |
2855 else |
2857 else |
2856 { |
2858 { |
2857 AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), |
2859 AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(), |
2858 id, |
2860 id, |
2859 KAknsIIDQsnIconColors, |
2861 KAknsIIDQsnIconColors, |
2860 colorGroup, |
2862 colorGroup, |
2861 iForgroundBmp, |
2863 iForgroundBmp, |
2862 iForgroundBmpMask, |
2864 iForgroundBmpMask, |
2874 AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), |
2876 AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), |
2875 EAspectRatioNotPreserved);*/ |
2877 EAspectRatioNotPreserved);*/ |
2876 } |
2878 } |
2877 else |
2879 else |
2878 { |
2880 { |
2879 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
2881 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
2880 id, |
2882 id, |
2881 iForgroundBmp, |
2883 iForgroundBmp, |
2882 bmpFileName, |
2884 bmpFileName, |
2883 bmpId); |
2885 bmpId); |
2884 AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); |
2886 AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); |
2934 { |
2936 { |
2935 if (bmpMskId != KInvalidBmp) |
2937 if (bmpMskId != KInvalidBmp) |
2936 { |
2938 { |
2937 if( colorGroup == KInvalidColorGroup ) |
2939 if( colorGroup == KInvalidColorGroup ) |
2938 { |
2940 { |
2939 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
2941 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
2940 id, |
2942 id, |
2941 iForgroundBmp, |
2943 iForgroundBmp, |
2942 iForgroundBmpMask, |
2944 iForgroundBmpMask, |
2943 bmpFileName, |
2945 bmpFileName, |
2944 bmpId, |
2946 bmpId, |
2945 bmpMskId); |
2947 bmpMskId); |
2946 } |
2948 } |
2947 else |
2949 else |
2948 { |
2950 { |
2949 AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), |
2951 AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(), |
2950 id, |
2952 id, |
2951 KAknsIIDQsnIconColors, |
2953 KAknsIIDQsnIconColors, |
2952 colorGroup, |
2954 colorGroup, |
2953 iForgroundBmp, |
2955 iForgroundBmp, |
2954 iForgroundBmpMask, |
2956 iForgroundBmpMask, |
2966 iForgroundBmpMask ); |
2968 iForgroundBmpMask ); |
2967 AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), EAspectRatioNotPreserved);*/ |
2969 AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), EAspectRatioNotPreserved);*/ |
2968 } |
2970 } |
2969 else |
2971 else |
2970 { |
2972 { |
2971 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
2973 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
2972 id, |
2974 id, |
2973 iForgroundBmp, |
2975 iForgroundBmp, |
2974 bmpFileName, |
2976 bmpFileName, |
2975 bmpId); |
2977 bmpId); |
2976 AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); |
2978 AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); |
3015 CFbsBitmap* bmpMask = NULL; |
3017 CFbsBitmap* bmpMask = NULL; |
3016 |
3018 |
3017 // Draw background |
3019 // Draw background |
3018 if( IsDimmed() ) // Dimmed state |
3020 if( IsDimmed() ) // Dimmed state |
3019 { |
3021 { |
3020 AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), |
3022 AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), |
3021 *gc, |
3023 *gc, |
3022 rect, |
3024 rect, |
3023 innerRect, |
3025 innerRect, |
3024 iInactiveImgID, |
3026 iInactiveImgID, |
3025 KAknsIIDDefault ); |
3027 KAknsIIDDefault ); |
3046 else |
3048 else |
3047 { |
3049 { |
3048 ImgID = /*iPressed*/PointerDown()? iPressedImgID : iNormalImgID; |
3050 ImgID = /*iPressed*/PointerDown()? iPressedImgID : iNormalImgID; |
3049 } |
3051 } |
3050 |
3052 |
3051 AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), |
3053 AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), |
3052 *gc, |
3054 *gc, |
3053 rect, |
3055 rect, |
3054 innerRect, |
3056 innerRect, |
3055 ImgID, |
3057 ImgID, |
3056 KAknsIIDDefault ); |
3058 KAknsIIDDefault ); |
3099 else |
3101 else |
3100 { |
3102 { |
3101 TRgb color( KRgbBlack ); // sane default for nonskinned case |
3103 TRgb color( KRgbBlack ); // sane default for nonskinned case |
3102 if ( AknsUtils::AvkonSkinEnabled() ) |
3104 if ( AknsUtils::AvkonSkinEnabled() ) |
3103 { |
3105 { |
3104 AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), |
3106 AknsUtils::GetCachedColor( UiLayout()->SkinInstance(), |
3105 color, KAknsIIDQsnTextColors, iTextColorIndex ); |
3107 color, KAknsIIDQsnTextColors, iTextColorIndex ); |
3106 } |
3108 } |
3107 if( IsDimmed() ) |
3109 if( IsDimmed() ) |
3108 { |
3110 { |
3109 color = KRgbGray; |
3111 color = KRgbGray; |
3529 { |
3531 { |
3530 if (bmpMskId != KInvalidBmp) |
3532 if (bmpMskId != KInvalidBmp) |
3531 { |
3533 { |
3532 if( colorGroup == KInvalidColorGroup ) |
3534 if( colorGroup == KInvalidColorGroup ) |
3533 { |
3535 { |
3534 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
3536 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
3535 id, |
3537 id, |
3536 iForground1Bmp, |
3538 iForground1Bmp, |
3537 iForground1BmpMask, |
3539 iForground1BmpMask, |
3538 bmpFileName, |
3540 bmpFileName, |
3539 bmpId, |
3541 bmpId, |
3540 bmpMskId); |
3542 bmpMskId); |
3541 } |
3543 } |
3542 else |
3544 else |
3543 { |
3545 { |
3544 AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), |
3546 AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(), |
3545 id, |
3547 id, |
3546 KAknsIIDQsnIconColors, |
3548 KAknsIIDQsnIconColors, |
3547 colorGroup, |
3549 colorGroup, |
3548 iForground1Bmp, |
3550 iForground1Bmp, |
3549 iForground1BmpMask, |
3551 iForground1BmpMask, |
3561 AknIconUtils::SetSize(iForground1DimBmpMask, iForground1BmpRect.Size(), |
3563 AknIconUtils::SetSize(iForground1DimBmpMask, iForground1BmpRect.Size(), |
3562 EAspectRatioNotPreserved);*/ |
3564 EAspectRatioNotPreserved);*/ |
3563 } |
3565 } |
3564 else |
3566 else |
3565 { |
3567 { |
3566 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
3568 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
3567 id, |
3569 id, |
3568 iForground1Bmp, |
3570 iForground1Bmp, |
3569 bmpFileName, |
3571 bmpFileName, |
3570 bmpId); |
3572 bmpId); |
3571 AknIconUtils::SetSize(iForground1Bmp, iForground1BmpRect.Size(), EAspectRatioNotPreserved); |
3573 AknIconUtils::SetSize(iForground1Bmp, iForground1BmpRect.Size(), EAspectRatioNotPreserved); |
3588 { |
3590 { |
3589 if (bmp2MskId != KInvalidBmp) |
3591 if (bmp2MskId != KInvalidBmp) |
3590 { |
3592 { |
3591 if( colorGroup == KInvalidColorGroup ) |
3593 if( colorGroup == KInvalidColorGroup ) |
3592 { |
3594 { |
3593 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
3595 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
3594 id2, |
3596 id2, |
3595 iForground2Bmp, |
3597 iForground2Bmp, |
3596 iForground2BmpMask, |
3598 iForground2BmpMask, |
3597 bmpFileName, |
3599 bmpFileName, |
3598 bmp2Id, |
3600 bmp2Id, |
3599 bmp2MskId); |
3601 bmp2MskId); |
3600 } |
3602 } |
3601 else |
3603 else |
3602 { |
3604 { |
3603 AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), |
3605 AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(), |
3604 id2, |
3606 id2, |
3605 KAknsIIDQsnIconColors, |
3607 KAknsIIDQsnIconColors, |
3606 colorGroup, |
3608 colorGroup, |
3607 iForground2Bmp, |
3609 iForground2Bmp, |
3608 iForground2BmpMask, |
3610 iForground2BmpMask, |
3620 AknIconUtils::SetSize(iForground2DimBmpMask, iForground2BmpRect.Size(), |
3622 AknIconUtils::SetSize(iForground2DimBmpMask, iForground2BmpRect.Size(), |
3621 EAspectRatioNotPreserved);*/ |
3623 EAspectRatioNotPreserved);*/ |
3622 } |
3624 } |
3623 else |
3625 else |
3624 { |
3626 { |
3625 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
3627 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
3626 id2, |
3628 id2, |
3627 iForground2Bmp, |
3629 iForground2Bmp, |
3628 bmpFileName, |
3630 bmpFileName, |
3629 bmp2Id); |
3631 bmp2Id); |
3630 AknIconUtils::SetSize(iForground2Bmp, iForground2BmpRect.Size(), EAspectRatioNotPreserved); |
3632 AknIconUtils::SetSize(iForground2Bmp, iForground2BmpRect.Size(), EAspectRatioNotPreserved); |
3677 { |
3679 { |
3678 if (bmpMskId != KInvalidBmp) |
3680 if (bmpMskId != KInvalidBmp) |
3679 { |
3681 { |
3680 if( colorGroup == KInvalidColorGroup ) |
3682 if( colorGroup == KInvalidColorGroup ) |
3681 { |
3683 { |
3682 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
3684 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
3683 id, |
3685 id, |
3684 iForground1Bmp, |
3686 iForground1Bmp, |
3685 iForground1BmpMask, |
3687 iForground1BmpMask, |
3686 bmpFileName, |
3688 bmpFileName, |
3687 bmpId, |
3689 bmpId, |
3688 bmpMskId); |
3690 bmpMskId); |
3689 } |
3691 } |
3690 else |
3692 else |
3691 { |
3693 { |
3692 AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), |
3694 AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(), |
3693 id, |
3695 id, |
3694 KAknsIIDQsnIconColors, |
3696 KAknsIIDQsnIconColors, |
3695 colorGroup, |
3697 colorGroup, |
3696 iForground1Bmp, |
3698 iForground1Bmp, |
3697 iForground1BmpMask, |
3699 iForground1BmpMask, |
3708 iForground1BmpMask ); |
3710 iForground1BmpMask ); |
3709 AknIconUtils::SetSize(iForground1DimBmpMask, iForground1BmpRect.Size(), EAspectRatioNotPreserved);*/ |
3711 AknIconUtils::SetSize(iForground1DimBmpMask, iForground1BmpRect.Size(), EAspectRatioNotPreserved);*/ |
3710 } |
3712 } |
3711 else |
3713 else |
3712 { |
3714 { |
3713 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
3715 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
3714 id, |
3716 id, |
3715 iForground1Bmp, |
3717 iForground1Bmp, |
3716 bmpFileName, |
3718 bmpFileName, |
3717 bmpId); |
3719 bmpId); |
3718 AknIconUtils::SetSize(iForground1Bmp, iForground1BmpRect.Size(), EAspectRatioNotPreserved); |
3720 AknIconUtils::SetSize(iForground1Bmp, iForground1BmpRect.Size(), EAspectRatioNotPreserved); |
3744 { |
3746 { |
3745 if (bmp2MskId != KInvalidBmp) |
3747 if (bmp2MskId != KInvalidBmp) |
3746 { |
3748 { |
3747 if( colorGroup == KInvalidColorGroup ) |
3749 if( colorGroup == KInvalidColorGroup ) |
3748 { |
3750 { |
3749 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
3751 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
3750 id2, |
3752 id2, |
3751 iForground2Bmp, |
3753 iForground2Bmp, |
3752 iForground2BmpMask, |
3754 iForground2BmpMask, |
3753 bmpFileName, |
3755 bmpFileName, |
3754 bmp2Id, |
3756 bmp2Id, |
3755 bmp2MskId); |
3757 bmp2MskId); |
3756 } |
3758 } |
3757 else |
3759 else |
3758 { |
3760 { |
3759 AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), |
3761 AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(), |
3760 id, |
3762 id, |
3761 KAknsIIDQsnIconColors, |
3763 KAknsIIDQsnIconColors, |
3762 colorGroup, |
3764 colorGroup, |
3763 iForground2Bmp, |
3765 iForground2Bmp, |
3764 iForground2BmpMask, |
3766 iForground2BmpMask, |
3775 AknIconUtils::SetSize(iForground2DimBmpMask, iForground2BmpRect.Size(), |
3777 AknIconUtils::SetSize(iForground2DimBmpMask, iForground2BmpRect.Size(), |
3776 EAspectRatioNotPreserved);*/ |
3778 EAspectRatioNotPreserved);*/ |
3777 } |
3779 } |
3778 else |
3780 else |
3779 { |
3781 { |
3780 AknsUtils::CreateIconL(AknsUtils::SkinInstance(), |
3782 AknsUtils::CreateIconL(UiLayout()->SkinInstance(), |
3781 id, |
3783 id, |
3782 iForground2Bmp, |
3784 iForground2Bmp, |
3783 bmpFileName, |
3785 bmpFileName, |
3784 bmp2Id); |
3786 bmp2Id); |
3785 AknIconUtils::SetSize(iForground2Bmp, iForground2BmpRect.Size(), EAspectRatioPreserved); |
3787 AknIconUtils::SetSize(iForground2Bmp, iForground2BmpRect.Size(), EAspectRatioPreserved); |
3830 CFbsBitmap* bmpMask2 = NULL; |
3832 CFbsBitmap* bmpMask2 = NULL; |
3831 |
3833 |
3832 // Draw background |
3834 // Draw background |
3833 if( IsDimmed() ) // Dimmed state |
3835 if( IsDimmed() ) // Dimmed state |
3834 { |
3836 { |
3835 AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), |
3837 AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), |
3836 *gc, |
3838 *gc, |
3837 rect, |
3839 rect, |
3838 innerRect, |
3840 innerRect, |
3839 iInactiveImgID, |
3841 iInactiveImgID, |
3840 KAknsIIDDefault ); |
3842 KAknsIIDDefault ); |
3871 else |
3873 else |
3872 { |
3874 { |
3873 ImgID = /*iPressed*/PointerDown()? iPressedImgID : iNormalImgID; |
3875 ImgID = /*iPressed*/PointerDown()? iPressedImgID : iNormalImgID; |
3874 } |
3876 } |
3875 |
3877 |
3876 AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), |
3878 AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), |
3877 *gc, |
3879 *gc, |
3878 rect, |
3880 rect, |
3879 innerRect, |
3881 innerRect, |
3880 ImgID, |
3882 ImgID, |
3881 KAknsIIDDefault ); |
3883 KAknsIIDDefault ); |