textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp
branchRCL_3
changeset 9 e6a39382bb9c
parent 8 4eb1ae11334f
child 11 c8fb4cf7b3ae
equal deleted inserted replaced
8:4eb1ae11334f 9:e6a39382bb9c
   127                 textLayout.LayoutText(Rect(), 
   127                 textLayout.LayoutText(Rect(), 
   128                                       iKeyboard->TextLineLayout(TVirtualKeyTextPos(i)));
   128                                       iKeyboard->TextLineLayout(TVirtualKeyTextPos(i)));
   129 				TRgb color( KRgbBlack );  // sane default for nonskinned case			    
   129 				TRgb color( KRgbBlack );  // sane default for nonskinned case			    
   130 			    if ( AknsUtils::AvkonSkinEnabled() )
   130 			    if ( AknsUtils::AvkonSkinEnabled() )
   131 			        {
   131 			        {
   132 			        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
   132 			        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
   133 				                               color, 
   133 				                               color, 
   134 				                               KAknsIIDQsnTextColors, 
   134 				                               KAknsIIDQsnTextColors, 
   135 				                               iKeyboard->KeyTextColorGroup() );
   135 				                               iKeyboard->KeyTextColorGroup() );
   136 			        }
   136 			        }
   137 			    
   137 			    
   176 	    //    }
   176 	    //    }
   177 		TRgb color( KRgbBlack );  // sane default for nonskinned case			    
   177 		TRgb color( KRgbBlack );  // sane default for nonskinned case			    
   178 	    if ( AknsUtils::AvkonSkinEnabled() || 
   178 	    if ( AknsUtils::AvkonSkinEnabled() || 
   179 	    	 iKeyboard->KeyTextColorGroup() != INVALID_COLOR_GROUP )
   179 	    	 iKeyboard->KeyTextColorGroup() != INVALID_COLOR_GROUP )
   180 	        {
   180 	        {
   181 	        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
   181 	        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
   182 		                               color, 
   182 		                               color, 
   183 		                               KAknsIIDQsnTextColors, 
   183 		                               KAknsIIDQsnTextColors, 
   184 		                               iKeyboard->KeyTextColorGroup() );
   184 		                               iKeyboard->KeyTextColorGroup() );
   185 	        }
   185 	        }
   186 	    else
   186 	    else
   226        iVirtualKeyDrawInfo.iVKDimRightImgID.iMajor)
   226        iVirtualKeyDrawInfo.iVKDimRightImgID.iMajor)
   227         {
   227         {
   228         TRect innerRect = Rect();
   228         TRect innerRect = Rect();
   229 		innerRect.Shrink( 4, 0 );
   229 		innerRect.Shrink( 4, 0 );
   230 		    
   230 		    
   231 		AknPenInputDrawUtils::Draw3PiecesFrame(AknsUtils::SkinInstance(),
   231 		AknPenInputDrawUtils::Draw3PiecesFrame(UiLayout()->SkinInstance(),
   232 								   *gc,
   232 								   *gc,
   233 								   Rect(),
   233 								   Rect(),
   234 								   innerRect,
   234 								   innerRect,
   235 								   iVirtualKeyDrawInfo.iVKDimLeftImgID,
   235 								   iVirtualKeyDrawInfo.iVKDimLeftImgID,
   236 								   iVirtualKeyDrawInfo.iVKDimMiddleImgID,
   236 								   iVirtualKeyDrawInfo.iVKDimMiddleImgID,
   243     else if (iKeyboard->KeySkinId(EKeyBmpDim) != KAknsIIDNone)
   243     else if (iKeyboard->KeySkinId(EKeyBmpDim) != KAknsIIDNone)
   244         {
   244         {
   245         TRect innerrect = rect;
   245         TRect innerrect = rect;
   246         innerrect.Shrink( KDefaultKeyMargin, KDefaultKeyMargin );
   246         innerrect.Shrink( KDefaultKeyMargin, KDefaultKeyMargin );
   247         
   247         
   248         AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(),
   248         AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(),
   249                                  *gc,
   249                                  *gc,
   250                                  rect,
   250                                  rect,
   251                                  innerrect,
   251                                  innerrect,
   252                                  iKeyboard->KeySkinId(EKeyBmpDim),
   252                                  iKeyboard->KeySkinId(EKeyBmpDim),
   253                                  KAknsIIDDefault);
   253                                  KAknsIIDDefault);
   335        iVirtualKeyDrawInfo.iVKRightImgID.iMajor)
   335        iVirtualKeyDrawInfo.iVKRightImgID.iMajor)
   336         {
   336         {
   337         TRect innerRect = Rect();
   337         TRect innerRect = Rect();
   338 		innerRect.Shrink( 4, 0 );
   338 		innerRect.Shrink( 4, 0 );
   339 		    
   339 		    
   340 		AknPenInputDrawUtils::Draw3PiecesFrame(AknsUtils::SkinInstance(),
   340 		AknPenInputDrawUtils::Draw3PiecesFrame(UiLayout()->SkinInstance(),
   341 								   *gc,
   341 								   *gc,
   342 								   Rect(),
   342 								   Rect(),
   343 								   innerRect,
   343 								   innerRect,
   344 								   iVirtualKeyDrawInfo.iVKLeftImgID,
   344 								   iVirtualKeyDrawInfo.iVKLeftImgID,
   345 								   iVirtualKeyDrawInfo.iVKMiddleImgID,
   345 								   iVirtualKeyDrawInfo.iVKMiddleImgID,
   352     else if (iKeyboard->KeySkinId(EKeyBmpNormal) != KAknsIIDNone)
   352     else if (iKeyboard->KeySkinId(EKeyBmpNormal) != KAknsIIDNone)
   353         {
   353         {
   354         TRect innerrect = rect;
   354         TRect innerrect = rect;
   355         innerrect.Shrink( KDefaultKeyMargin, KDefaultKeyMargin );
   355         innerrect.Shrink( KDefaultKeyMargin, KDefaultKeyMargin );
   356 
   356 
   357         AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(), 
   357         AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(), 
   358                                  *gc, 
   358                                  *gc, 
   359                                  rect, 
   359                                  rect, 
   360                                  innerrect,
   360                                  innerrect,
   361                                  iKeyboard->KeySkinId(EKeyBmpNormal), 
   361                                  iKeyboard->KeySkinId(EKeyBmpNormal), 
   362                                  KAknsIIDDefault); 
   362                                  KAknsIIDDefault); 
   417        iVirtualKeyDrawInfo.iVKPressedRightImgID.iMajor)
   417        iVirtualKeyDrawInfo.iVKPressedRightImgID.iMajor)
   418         {
   418         {
   419         TRect innerRect = Rect();
   419         TRect innerRect = Rect();
   420 		innerRect.Shrink( 4, 0 );
   420 		innerRect.Shrink( 4, 0 );
   421 		    
   421 		    
   422 		AknPenInputDrawUtils::Draw3PiecesFrame(AknsUtils::SkinInstance(),
   422 		AknPenInputDrawUtils::Draw3PiecesFrame(UiLayout()->SkinInstance(),
   423 								   *gc,
   423 								   *gc,
   424 								   Rect(),
   424 								   Rect(),
   425 								   innerRect,
   425 								   innerRect,
   426 								   iVirtualKeyDrawInfo.iVKPressedLeftImgID,
   426 								   iVirtualKeyDrawInfo.iVKPressedLeftImgID,
   427 								   iVirtualKeyDrawInfo.iVKPressedMiddleImgID,
   427 								   iVirtualKeyDrawInfo.iVKPressedMiddleImgID,
   437     else if (iKeyboard->KeySkinId(EKeyBmpHighlight) != KAknsIIDNone)
   437     else if (iKeyboard->KeySkinId(EKeyBmpHighlight) != KAknsIIDNone)
   438         {
   438         {
   439         TRect innerrect = rect;
   439         TRect innerrect = rect;
   440         innerrect.Shrink( KDefaultKeyMargin, KDefaultKeyMargin );
   440         innerrect.Shrink( KDefaultKeyMargin, KDefaultKeyMargin );
   441 
   441 
   442         AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(), 
   442         AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(), 
   443                                  *gc, 
   443                                  *gc, 
   444                                  rect, 
   444                                  rect, 
   445                                  innerrect,
   445                                  innerrect,
   446                                  iKeyboard->KeySkinId(EKeyBmpHighlight), 
   446                                  iKeyboard->KeySkinId(EKeyBmpHighlight), 
   447                                  KAknsIIDDefault); 
   447                                  KAknsIIDDefault);