3293 CleanupStack::Pop( node ); |
3293 CleanupStack::Pop( node ); |
3294 return node; |
3294 return node; |
3295 } |
3295 } |
3296 |
3296 |
3297 // ----------------------------------------------------------------------------- |
3297 // ----------------------------------------------------------------------------- |
3298 // Create scaled bitmap from source bitmap. |
|
3299 // ----------------------------------------------------------------------------- |
|
3300 // |
|
3301 void CreateScaledBitmapL( |
|
3302 const TRect& aRect, |
|
3303 CFbsBitmap*& aTrgBitmap, |
|
3304 CFbsBitmap* aSrcBitmap, |
|
3305 TBool aPreserveAspectRatio, |
|
3306 TBool aForceFallBack ) |
|
3307 { |
|
3308 TRect destRect = aRect; |
|
3309 |
|
3310 if ( aPreserveAspectRatio ) |
|
3311 { |
|
3312 // Calculate the bitmap image dimensions so that it uses maximum space |
|
3313 // of the given rectangle and maintains aspect ratio. |
|
3314 TInt srcHeight = aSrcBitmap->SizeInPixels().iHeight; |
|
3315 TInt srcWidth = aSrcBitmap->SizeInPixels().iWidth; |
|
3316 TReal scaleRatio( 1 ); //no scale as defaul |
|
3317 |
|
3318 //If any dimension is 0, then we do not bother to scale |
|
3319 if ( aRect.Width() > 0 && aRect.Height() > 0 ) |
|
3320 { |
|
3321 TReal xRatio = ( ( TReal )srcWidth / ( TReal )aRect.Width() ); |
|
3322 TReal yRatio = ( ( TReal )srcHeight / ( TReal )aRect.Height() ); |
|
3323 //Find out appropriate scaling factor |
|
3324 xRatio > yRatio ? ( scaleRatio = xRatio ) : ( scaleRatio = yRatio ); |
|
3325 } |
|
3326 |
|
3327 //Scale the size for target bitmap |
|
3328 destRect.SetHeight( srcHeight / scaleRatio ); |
|
3329 destRect.SetWidth( srcWidth / scaleRatio ); |
|
3330 } |
|
3331 |
|
3332 // see if there's a need to scale. If source and destination size are the same, |
|
3333 // then we don't need to duplicate the bitmap. aTrgBitmap will be null. |
|
3334 TSize srcSize = aSrcBitmap->SizeInPixels(); |
|
3335 TSize destSize = destRect.Size(); |
|
3336 if ( srcSize == destSize ) |
|
3337 { |
|
3338 return; |
|
3339 } |
|
3340 |
|
3341 aTrgBitmap = new ( ELeave ) CFbsBitmap; |
|
3342 CleanupStack::PushL( aTrgBitmap ); |
|
3343 //It is allowed to create zero height or width bitmap. |
|
3344 TInt err( aTrgBitmap->Create( destRect.Size(), aSrcBitmap->DisplayMode() ) ); |
|
3345 |
|
3346 if ( err == KErrNone ) |
|
3347 { |
|
3348 CXnUtils::ScaleBitmapExtL( destRect, aTrgBitmap, aSrcBitmap, aForceFallBack ); |
|
3349 } |
|
3350 |
|
3351 //we do not own the bitmap so just Pop. |
|
3352 CleanupStack::Pop( aTrgBitmap ); |
|
3353 } |
|
3354 |
|
3355 // ----------------------------------------------------------------------------- |
|
3356 // SoftkeyNode |
3298 // SoftkeyNode |
3357 // Gets the node of softkey according to pointer location |
3299 // Gets the node of softkey according to pointer location |
3358 // ----------------------------------------------------------------------------- |
3300 // ----------------------------------------------------------------------------- |
3359 // |
3301 // |
3360 static CXnNode* SoftkeyNode( CXnNode* aMenuBarNode, const TPoint aPosition ) |
3302 static CXnNode* SoftkeyNode( CXnNode* aMenuBarNode, const TPoint aPosition ) |
4196 CXnDomPropertyValue* value = |
4134 CXnDomPropertyValue* value = |
4197 static_cast< CXnDomPropertyValue* >( |
4135 static_cast< CXnDomPropertyValue* >( |
4198 colorProperty->Property()->PropertyValueList().Item( 0 ) ); |
4136 colorProperty->Property()->PropertyValueList().Item( 0 ) ); |
4199 |
4137 |
4200 if ( value->PrimitiveValueType() == CXnDomPropertyValue::ERgbColor ) |
4138 if ( value->PrimitiveValueType() == CXnDomPropertyValue::ERgbColor ) |
4201 { |
4139 { |
4202 TRect paddingRect = aNode.PaddingRect(); |
4140 CFbsBitmap* bitmap( NULL ); |
4203 aMask->SetDisplayMode( EGray256 ); |
4141 TRgb rgb( value->RgbColorValueL() ); |
4204 |
4142 bitmap = CreateBitmapFromColorL( aMask->SizeInPixels(), rgb ); |
4205 aGc.SetBrushColor( NULL ); |
4143 |
4206 aGc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
4144 aGc.DrawBitmapMasked( |
4207 |
4145 aNode.PaddingRect(), |
4208 if ( !iScaledTransparentColor ) |
4146 bitmap, |
4209 { |
4147 TRect( TPoint( 0, 0 ), bitmap->SizeInPixels() ), |
4210 CFbsBitmap* bitmap( NULL ); |
4148 aMask, |
4211 CFbsBitmap* mask( NULL ); |
|
4212 |
|
4213 mask = new ( ELeave ) CFbsBitmap; |
|
4214 CleanupStack::PushL( mask ); |
|
4215 |
|
4216 mask->Create( paddingRect.Size(), EGray256 ); |
|
4217 |
|
4218 CXnUtils::ScaleBitmapL( |
|
4219 TRect( 0, 0, paddingRect.Width(), paddingRect.Height() ), |
|
4220 mask, aMask ); |
|
4221 |
|
4222 CXnDomPropertyValue* value = |
|
4223 static_cast< CXnDomPropertyValue* >( |
|
4224 colorProperty->Property()->PropertyValueList().Item( 0 ) ); |
|
4225 |
|
4226 TRgb rgb( value->RgbColorValueL() ); |
|
4227 |
|
4228 bitmap = CreateBitmapFromColorL( paddingRect.Size(), rgb ); |
|
4229 CleanupStack::PushL( bitmap ); |
|
4230 |
|
4231 iScaledTransparentColor = CGulIcon::NewL( bitmap, mask ); |
|
4232 |
|
4233 CleanupStack::Pop( 2 ); |
|
4234 } |
|
4235 |
|
4236 aGc.DrawBitmapMasked( paddingRect, |
|
4237 iScaledTransparentColor->Bitmap(), |
|
4238 TRect( TPoint( 0, 0 ), paddingRect.Size() ), |
|
4239 iScaledTransparentColor->Mask(), |
|
4240 EFalse ); |
4149 EFalse ); |
4241 } |
4150 |
4242 } |
4151 delete bitmap; |
4243 } |
4152 } |
4244 |
4153 } |
4245 // ----------------------------------------------------------------------------- |
4154 } |
4246 // CXnControlAdapterImpl::DrawBackgroundSkinL |
4155 |
|
4156 // ----------------------------------------------------------------------------- |
|
4157 // CXnControlAdapterImpl::DrawBackgroundSkin |
4247 // Draws a skin item to the given rect |
4158 // Draws a skin item to the given rect |
4248 // ----------------------------------------------------------------------------- |
4159 // ----------------------------------------------------------------------------- |
4249 // |
4160 // |
4250 void CXnControlAdapterImpl::DrawBackgroundSkin(const TAknsItemID& aSkinId, |
4161 void CXnControlAdapterImpl::DrawBackgroundSkin(const TAknsItemID& aSkinId, |
4251 CWindowGc& aGc, TRect aRect) |
4162 CWindowGc& aGc, TRect aRect) |
4321 |
4229 |
4322 AknsDrawUtils::Background( AknsUtils::SkinInstance(), |
4230 AknsDrawUtils::Background( AknsUtils::SkinInstance(), |
4323 frameContext, NULL, |
4231 frameContext, NULL, |
4324 static_cast< CWindowGc& >( *bc ), |
4232 static_cast< CWindowGc& >( *bc ), |
4325 outerRect, KAknsDrawParamNoClearUnderImage ); |
4233 outerRect, KAknsDrawParamNoClearUnderImage ); |
4326 |
4234 |
4327 aMask->SetDisplayMode( EGray256 ); |
4235 CleanupStack::PopAndDestroy( 3, device ); |
4328 |
|
4329 aGc.SetBrushColor( NULL ); |
|
4330 aGc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
4331 |
|
4332 mask->Create( paddingRect.Size(), EGray256 ); |
|
4333 |
|
4334 CXnUtils::ScaleBitmapL( outerRect, mask, aMask ); |
|
4335 |
|
4336 CleanupStack::PopAndDestroy( 3 ); |
|
4337 |
|
4338 iScaledBackgroundSkin = CGulIcon::NewL( bitmap, mask ); |
|
4339 |
|
4340 CleanupStack::Pop( 2 ); |
|
4341 } |
4236 } |
4342 |
4237 |
4343 CFbsBitmap* bitmap( iScaledBackgroundSkin->Bitmap() ); |
4238 aGc.DrawBitmapMasked( paddingRect, |
4344 CFbsBitmap* mask( iScaledBackgroundSkin->Mask() ); |
4239 iBackgroundBitmap, |
4345 |
4240 TRect(TPoint(0, 0), iBackgroundBitmap->SizeInPixels()), |
4346 aGc.BitBltMasked( paddingRect.iTl, bitmap, outerRect, mask, ETrue ); |
4241 aMask, |
|
4242 ETrue ); |
4347 } |
4243 } |
4348 else // draw background skin graphics without mask |
4244 else // draw background skin graphics without mask |
4349 { |
4245 { |
4350 TRect paddingRect = aRect; |
4246 TRect paddingRect = aRect; |
4351 TRect shrunkRect = paddingRect; |
4247 TRect shrunkRect = paddingRect; |
5081 } |
4940 } |
5082 |
4941 |
5083 TRect rect = iComponent->Node()->Node().Rect(); |
4942 TRect rect = iComponent->Node()->Node().Rect(); |
5084 |
4943 |
5085 // Check if the node has a property "preserve image aspect ratio". |
4944 // Check if the node has a property "preserve image aspect ratio". |
5086 TBool preserveAspectRatio = EFalse; |
4945 TBool preserveAspectRatio = ETrue; |
5087 CXnNode& currentNode = iComponent->Node()->Node(); |
4946 CXnNode& currentNode = iComponent->Node()->Node(); |
5088 |
4947 |
5089 CXnProperty* aspectProperty = currentNode.GetPropertyL( |
4948 CXnProperty* aspectProperty = currentNode.GetPropertyL( |
5090 XnPropertyNames::image::KS60AspectRatio ); |
4949 XnPropertyNames::image::KS60AspectRatio ); |
5091 if ( aspectProperty ) |
4950 if ( aspectProperty ) |
5092 { |
4951 { |
5093 const TDesC8& value = aspectProperty->StringValue(); |
4952 const TDesC8& value = aspectProperty->StringValue(); |
5094 |
4953 |
5095 if ( value.CompareF( XnPropertyNames::image::KPreserve ) == 0 ) |
4954 if ( value.CompareF( XnPropertyNames::image::KNone ) == 0 ) |
5096 { |
4955 { |
5097 preserveAspectRatio = ETrue; |
4956 preserveAspectRatio = EFalse; |
5098 } |
4957 } |
5099 } |
4958 } |
5100 |
4959 |
5101 TRect bitmapRect = rect; |
4960 TRect bitmapRect = rect; |
5102 bitmapRect.Move( -rect.iTl.iX, -rect.iTl.iY ); |
4961 bitmapRect.Move( -rect.iTl.iX, -rect.iTl.iY ); |
5103 |
|
5104 if ( AknIconUtils::IsMifIcon( iContentBitmap ) ) |
4962 if ( AknIconUtils::IsMifIcon( iContentBitmap ) ) |
5105 { |
4963 { |
5106 if ( preserveAspectRatio ) |
4964 if ( preserveAspectRatio ) |
5107 { |
4965 { |
5108 AknIconUtils::SetSize( |
4966 AknIconUtils::SetSize( |
5109 iContentBitmap, bitmapRect.Size(), EAspectRatioPreserved ); |
4967 iContentBitmap, bitmapRect.Size(), EAspectRatioPreserved ); |
|
4968 AknIconUtils::SetSize( |
|
4969 iContentMask, bitmapRect.Size(), EAspectRatioPreserved ); |
5110 } |
4970 } |
5111 else |
4971 else |
5112 { |
4972 { |
5113 AknIconUtils::SetSize( |
4973 AknIconUtils::SetSize( |
5114 iContentBitmap, bitmapRect.Size(), EAspectRatioNotPreserved ); |
4974 iContentBitmap, bitmapRect.Size(), EAspectRatioNotPreserved ); |
5115 } |
4975 AknIconUtils::SetSize( |
5116 //Calculate new point to start draw in order to center bitmap to drawing area |
4976 iContentMask, bitmapRect.Size(), EAspectRatioNotPreserved ); |
5117 rect.iTl.iY += |
4977 } |
5118 ( rect.Height() - iContentBitmap->SizeInPixels().iHeight ) / 2; |
4978 } |
5119 rect.iTl.iX += |
4979 |
5120 ( rect.Width() - iContentBitmap->SizeInPixels().iWidth ) / 2; |
4980 // Calculate new point to start draw |
5121 |
4981 // in order to center bitmap to drawing area |
5122 if ( iContentMask ) |
4982 rect.iTl.iY += |
5123 { |
4983 ( rect.Height() - bitmapRect.Height() ) / 2; |
5124 // Based on the avkon's assumtion that mask is always inverted, the |
4984 rect.iTl.iX += |
5125 // value of aInvertMask parameter is set to 'ETrue' |
4985 ( rect.Width() - bitmapRect.Width() ) / 2; |
5126 aGc.BitBltMasked( rect.iTl, iContentBitmap, bitmapRect, iContentMask, |
4986 |
5127 ETrue ); |
4987 if ( iContentBitmap && iContentMask ) |
5128 } |
4988 { |
5129 else |
4989 aGc.DrawBitmapMasked( rect, |
5130 { |
4990 iContentBitmap, |
5131 aGc.BitBlt( rect.iTl, iContentBitmap, bitmapRect ); |
4991 TRect(TPoint(0, 0), iContentBitmap->SizeInPixels()), |
5132 } |
4992 iContentMask, |
5133 } |
4993 ETrue ); |
5134 else |
4994 } |
5135 { |
4995 else if ( iContentBitmap ) |
5136 if ( !iScaledContentBitmap ) |
4996 { |
5137 { |
4997 aGc.DrawBitmap( rect, iContentBitmap ); |
5138 TBool forceFallBack = CXnUtils::DoesScaleBitmapUseFallBack( |
4998 } |
5139 iContentBitmap ); |
4999 } |
5140 |
|
5141 TRAPD( err, CreateScaledBitmapL( bitmapRect, |
|
5142 iScaledContentBitmap, |
|
5143 iContentBitmap, |
|
5144 preserveAspectRatio, |
|
5145 forceFallBack ) ); |
|
5146 if ( err ) |
|
5147 { |
|
5148 // return if CreateScaledBitmapL() leaves. This prevents the |
|
5149 // drawing of the original content bitmap which is wrong size. |
|
5150 return; |
|
5151 } |
|
5152 } |
|
5153 if ( iContentMask && !iScaledContentMask ) |
|
5154 { |
|
5155 TBool forceFallBack = CXnUtils::DoesScaleBitmapUseFallBack( |
|
5156 iContentMask ); |
|
5157 |
|
5158 TRAPD( err, CreateScaledBitmapL( bitmapRect, |
|
5159 iScaledContentMask, |
|
5160 iContentMask, |
|
5161 preserveAspectRatio, |
|
5162 forceFallBack ) ); |
|
5163 if ( err ) |
|
5164 { |
|
5165 // return if CreateScaledBitmapL() leaves. This prevents the |
|
5166 // drawing of the original content mask which is wrong size |
|
5167 // (and may distort the image). |
|
5168 return; |
|
5169 } |
|
5170 } |
|
5171 |
|
5172 CFbsBitmap* bitmap( 0 ); |
|
5173 CFbsBitmap* mask( 0 ); |
|
5174 |
|
5175 if ( iScaledContentBitmap ) |
|
5176 { |
|
5177 bitmap = iScaledContentBitmap; |
|
5178 } |
|
5179 else |
|
5180 { |
|
5181 bitmap = iContentBitmap; |
|
5182 } |
|
5183 |
|
5184 if ( iScaledContentMask ) |
|
5185 { |
|
5186 mask = iScaledContentMask; |
|
5187 } |
|
5188 else |
|
5189 { |
|
5190 mask = iContentMask; |
|
5191 } |
|
5192 |
|
5193 if ( bitmap && mask ) |
|
5194 { |
|
5195 //Calculate new point to start draw in order to center bitmap to |
|
5196 // drawing area |
|
5197 rect.iTl.iY += |
|
5198 ( rect.Height() - bitmap->SizeInPixels().iHeight ) / 2; |
|
5199 rect.iTl.iX += |
|
5200 ( rect.Width() - bitmap->SizeInPixels().iWidth ) / 2; |
|
5201 |
|
5202 // Based on the avkon's assumtion that mask is always inverted, the |
|
5203 // value of aInvertMask parameter is set to 'ETrue' |
|
5204 aGc.BitBltMasked( rect.iTl, bitmap, bitmapRect, mask, ETrue ); |
|
5205 } |
|
5206 else if ( bitmap ) |
|
5207 { |
|
5208 //Calculate new point to start draw in order to center bitmap to |
|
5209 // drawing area |
|
5210 rect.iTl.iY += |
|
5211 ( rect.Height() - bitmap->SizeInPixels().iHeight ) / 2; |
|
5212 rect.iTl.iX += |
|
5213 ( rect.Width() - bitmap->SizeInPixels().iWidth ) / 2; |
|
5214 |
|
5215 aGc.BitBlt( rect.iTl, bitmap ); |
|
5216 } |
|
5217 } |
|
5218 } |
|
5219 |
5000 |
5220 // ----------------------------------------------------------------------------- |
5001 // ----------------------------------------------------------------------------- |
5221 // CXnControlAdapterImpl::SizeChanged |
5002 // CXnControlAdapterImpl::SizeChanged |
5222 // ----------------------------------------------------------------------------- |
5003 // ----------------------------------------------------------------------------- |
5223 // |
5004 // |
5224 void CXnControlAdapterImpl::SizeChanged() |
5005 void CXnControlAdapterImpl::SizeChanged() |
5225 { |
5006 { |
5226 delete iScaledContentBitmap; |
|
5227 iScaledContentBitmap = NULL; |
|
5228 |
|
5229 delete iScaledContentMask; |
|
5230 iScaledContentMask = NULL; |
|
5231 |
|
5232 delete iScaledTransparentColor; |
|
5233 iScaledTransparentColor = NULL; |
|
5234 |
|
5235 delete iScaledBackgroundSkin; |
|
5236 iScaledBackgroundSkin = NULL; |
|
5237 |
|
5238 delete iScaledBackgroundImage; |
|
5239 iScaledBackgroundImage = NULL; |
|
5240 |
|
5241 TRAP_IGNORE( InitializeBackgroundAndBorderBitmapsL() ); |
5007 TRAP_IGNORE( InitializeBackgroundAndBorderBitmapsL() ); |
5242 } |
5008 } |
5243 |
5009 |
5244 // ----------------------------------------------------------------------------- |
5010 // ----------------------------------------------------------------------------- |
5245 // CXnControlAdapterImpl::SkinChanged |
5011 // CXnControlAdapterImpl::SkinChanged |
5246 // ----------------------------------------------------------------------------- |
5012 // ----------------------------------------------------------------------------- |
5247 // |
5013 // |
5248 void CXnControlAdapterImpl::SkinChanged() |
5014 void CXnControlAdapterImpl::SkinChanged() |
5249 { |
5015 { |
5250 delete iScaledContentBitmap; |
5016 TRAP_IGNORE( InitializeBackgroundAndBorderBitmapsL( ETrue ) ); |
5251 iScaledContentBitmap = NULL; |
|
5252 |
|
5253 delete iScaledContentMask; |
|
5254 iScaledContentMask = NULL; |
|
5255 |
|
5256 delete iScaledTransparentColor; |
|
5257 iScaledTransparentColor = NULL; |
|
5258 |
|
5259 delete iScaledBackgroundSkin; |
|
5260 iScaledBackgroundSkin = NULL; |
|
5261 |
|
5262 delete iScaledBackgroundImage; |
|
5263 iScaledBackgroundImage = NULL; |
|
5264 |
|
5265 TRAP_IGNORE( InitializeBackgroundAndBorderBitmapsL() ); |
|
5266 } |
5017 } |
5267 |
5018 |
5268 // ----------------------------------------------------------------------------- |
5019 // ----------------------------------------------------------------------------- |
5269 // CXnControlAdapterImpl::FocusChangedL |
5020 // CXnControlAdapterImpl::FocusChangedL |
5270 // ----------------------------------------------------------------------------- |
5021 // ----------------------------------------------------------------------------- |
5396 |
5147 |
5397 // ----------------------------------------------------------------------------- |
5148 // ----------------------------------------------------------------------------- |
5398 // CXnControlAdapterImpl::InitializeBackgroundandBorderBitmapsL |
5149 // CXnControlAdapterImpl::InitializeBackgroundandBorderBitmapsL |
5399 // ----------------------------------------------------------------------------- |
5150 // ----------------------------------------------------------------------------- |
5400 // |
5151 // |
5401 void CXnControlAdapterImpl::InitializeBackgroundAndBorderBitmapsL() |
5152 void CXnControlAdapterImpl::InitializeBackgroundAndBorderBitmapsL( |
|
5153 TBool aForceRecreate ) |
5402 { |
5154 { |
5403 CXnNode& node( iNode.Node() ); |
5155 CXnNode& node( iNode.Node() ); |
5404 CXnUiEngine* engine( node.UiEngine() ); |
5156 CXnUiEngine* engine( node.UiEngine() ); |
5405 |
5157 |
5406 CXnProperty* backgroundImageProperty( node.BackgroundImageL() ); |
5158 CXnProperty* backgroundImageProperty( node.BackgroundImageL() ); |
5407 |
5159 |
5408 if ( backgroundImageProperty ) |
5160 // if skin changed we need recreate icons |
|
5161 if ( backgroundImageProperty && aForceRecreate ) |
|
5162 { |
|
5163 iBackgrondInitialized = EFalse; |
|
5164 } |
|
5165 |
|
5166 if ( backgroundImageProperty && !iBackgrondInitialized ) |
5409 { |
5167 { |
5410 delete iBackgroundBitmap; |
5168 delete iBackgroundBitmap; |
5411 iBackgroundBitmap = NULL; |
5169 iBackgroundBitmap = NULL; |
5412 |
5170 |
5413 delete iBackgroundMask; |
5171 delete iBackgroundMask; |
5414 iBackgroundMask = NULL; |
5172 iBackgroundMask = NULL; |
5415 |
5173 |
5416 delete iScaledTransparentColor; |
|
5417 iScaledTransparentColor = NULL; |
|
5418 |
|
5419 delete iScaledBackgroundSkin; |
|
5420 iScaledBackgroundSkin = NULL; |
|
5421 |
|
5422 delete iScaledBackgroundImage; |
|
5423 iScaledBackgroundImage = NULL; |
|
5424 |
|
5425 InitializeBackgroundBitmapL( *engine, node, iBackgroundBitmapIndex, |
5174 InitializeBackgroundBitmapL( *engine, node, iBackgroundBitmapIndex, |
5426 iBackgroundBitmap, iBackgroundMask, iIconProvider, FsSession() ); |
5175 iBackgroundBitmap, iBackgroundMask, iIconProvider, FsSession() ); |
5427 |
5176 |
5428 HBufC* bgPath( GetBackgroundImagePathLC( node ) ); |
5177 HBufC* bgPath( GetBackgroundImagePathLC( node ) ); |
5429 |
5178 |
5430 if ( *bgPath != KNullDesC ) |
5179 if ( *bgPath != KNullDesC ) |
5431 { |
5180 { |
5432 iAnimIDResolved = CXnUtils::ResolveSkinItemIDL( *bgPath, iAnimIID ); |
5181 iAnimIDResolved = CXnUtils::ResolveSkinItemIDL( *bgPath, iAnimIID ); |
5433 } |
5182 } |
5434 |
|
5435 CleanupStack::PopAndDestroy( bgPath ); |
5183 CleanupStack::PopAndDestroy( bgPath ); |
|
5184 iBackgrondInitialized = ETrue; |
5436 } |
5185 } |
5437 |
5186 |
5438 CXnProperty* borderImageProperty( node.BorderImageL() ); |
5187 CXnProperty* borderImageProperty( node.BorderImageL() ); |
5439 |
5188 |
5440 if ( borderImageProperty ) |
5189 // if skin changed we need recreate icons |
|
5190 if ( borderImageProperty && aForceRecreate ) |
|
5191 { |
|
5192 iBorderInitialized = EFalse; |
|
5193 } |
|
5194 |
|
5195 if ( borderImageProperty && !iBorderInitialized ) |
5441 { |
5196 { |
5442 delete iBorderBitmap; |
5197 delete iBorderBitmap; |
5443 iBorderBitmap = NULL; |
5198 iBorderBitmap = NULL; |
5444 |
5199 |
5445 iBorderBitmap = InitializeBorderBitmapL( |
5200 iBorderBitmap = InitializeBorderBitmapL( |
5446 *engine, node, |
5201 *engine, node, |
5447 iBorderBitmapIndex, iBorderBitmapDividerTop, |
5202 iBorderBitmapIndex, iBorderBitmapDividerTop, |
5448 iBorderBitmapDividerRight, |
5203 iBorderBitmapDividerRight, |
5449 iBorderBitmapDividerBottom, iBorderBitmapDividerLeft, |
5204 iBorderBitmapDividerBottom, iBorderBitmapDividerLeft, |
5450 iIconProvider, FsSession() ); |
5205 iIconProvider, FsSession() ); |
|
5206 |
|
5207 iBorderInitialized = ETrue; |
5451 } |
5208 } |
5452 } |
5209 } |
5453 |
5210 |
5454 // ----------------------------------------------------------------------------- |
5211 // ----------------------------------------------------------------------------- |
5455 // CXnControlAdapterImpl::ConstructL |
5212 // CXnControlAdapterImpl::ConstructL |