equal
deleted
inserted
replaced
30 |
30 |
31 #include <AknsDrawUtils.h> |
31 #include <AknsDrawUtils.h> |
32 #include <AknUtils.h> |
32 #include <AknUtils.h> |
33 |
33 |
34 #include "huiskinbackroundlayout.h" |
34 #include "huiskinbackroundlayout.h" |
35 |
35 #include "huiextension.h" |
36 |
36 |
37 struct TBackgroundTexture |
37 struct TBackgroundTexture |
38 { |
38 { |
39 TAknsItemID iID; |
39 TAknsItemID iID; |
40 CHuiTexture* iBackgroundTexture; //not owned |
40 CHuiTexture* iBackgroundTexture; //not owned |
186 } |
186 } |
187 |
187 |
188 |
188 |
189 EXPORT_C void CHuiS60Skin::SkinContentChanged() |
189 EXPORT_C void CHuiS60Skin::SkinContentChanged() |
190 { |
190 { |
191 FreeAllBackgroundTextureResources(); |
191 |
192 } |
192 } |
193 |
193 |
194 EXPORT_C void CHuiS60Skin::SkinConfigurationChanged( |
194 EXPORT_C void CHuiS60Skin::SkinConfigurationChanged( |
195 const TAknsSkinStatusConfigurationChangeReason aReason ) |
195 const TAknsSkinStatusConfigurationChangeReason aReason ) |
196 { |
196 { |
|
197 if (aReason == EAknsSkinStatusConfigurationDeployed) |
|
198 { |
|
199 FreeAllBackgroundTextureResources(); |
|
200 Env().NotifySkinChangedL(); |
|
201 Env().TextStyleManager().NotifyDisplaySizeChangedL(); |
|
202 ReloadBgTexturesL(); |
|
203 } |
197 |
204 |
198 } |
205 } |
199 |
206 |
200 EXPORT_C void CHuiS60Skin::SkinPackageChanged( |
207 EXPORT_C void CHuiS60Skin::SkinPackageChanged( |
201 const TAknsSkinStatusPackageChangeReason aReason ) |
208 const TAknsSkinStatusPackageChangeReason aReason ) |
248 |
255 |
249 |
256 |
250 EXPORT_C void CHuiS60Skin::NotifyDisplaySizeChangedL() |
257 EXPORT_C void CHuiS60Skin::NotifyDisplaySizeChangedL() |
251 { |
258 { |
252 // The background is now different. |
259 // The background is now different. |
253 SkinContentChanged(); // to delete old contents |
260 SkinConfigurationChanged(EAknsSkinStatusConfigurationDeployed); |
254 |
261 |
255 Env().NotifySkinChangedL(); |
|
256 Env().TextStyleManager().NotifyDisplaySizeChangedL(); |
|
257 ReloadBgTexturesL(); |
|
258 } |
262 } |
259 |
263 |
260 |
264 |
261 EXPORT_C TRgb CHuiS60Skin::StyleTextColor(THuiPreconfiguredTextStyle aStyle, |
265 EXPORT_C TRgb CHuiS60Skin::StyleTextColor(THuiPreconfiguredTextStyle aStyle, |
262 THuiBackgroundType aBackgroundType) const |
266 THuiBackgroundType aBackgroundType) const |
290 } |
294 } |
291 } |
295 } |
292 |
296 |
293 EXPORT_C void CHuiS60Skin::SkinExtension(const TUid& aExtensionUid, TAny** aExtensionParameters) |
297 EXPORT_C void CHuiS60Skin::SkinExtension(const TUid& aExtensionUid, TAny** aExtensionParameters) |
294 { |
298 { |
295 CHuiSkin::SkinExtension(aExtensionUid,aExtensionParameters); |
299 if (aExtensionUid == KHuiSkinReleaseCachedTextures) |
|
300 { |
|
301 FreeAllBackgroundTextureResources(); |
|
302 } |
|
303 else |
|
304 { |
|
305 CHuiSkin::SkinExtension(aExtensionUid, aExtensionParameters); |
|
306 } |
296 } |
307 } |
297 |
308 |
298 EXPORT_C THuiSkinOrientation CHuiS60Skin::Orientation() const |
309 EXPORT_C THuiSkinOrientation CHuiS60Skin::Orientation() const |
299 { |
310 { |
300 return CHuiSkin::Orientation(); |
311 return CHuiSkin::Orientation(); |
507 for (TInt index = 0; index < itemCount; index++) |
518 for (TInt index = 0; index < itemCount; index++) |
508 { |
519 { |
509 bgTexture = ((TPrivData*)(iSpare))->iBackgrounds[index]; |
520 bgTexture = ((TPrivData*)(iSpare))->iBackgrounds[index]; |
510 if (bgTexture.iID == aID) |
521 if (bgTexture.iID == aID) |
511 { |
522 { |
512 if(!bgTexture.iBackgroundTexture && !bgTexture.iBackgroundTexture->HasContent()) |
523 if(!bgTexture.iBackgroundTexture || !bgTexture.iBackgroundTexture->HasContent()) |
513 { |
524 { |
514 delete bgTexture.iBackgroundTexture; |
525 delete bgTexture.iBackgroundTexture; |
515 bgTexture.iBackgroundTexture = NULL; |
526 bgTexture.iBackgroundTexture = NULL; |
516 TRAPD(err, bgTexture.iBackgroundTexture = CreateSkinBackgroundL(bgTexture.iID)); |
527 TRAPD(err, bgTexture.iBackgroundTexture = CreateSkinBackgroundL(bgTexture.iID)); |
517 // put bgTexture back to the array also in leave cases |
528 // put bgTexture back to the array also in leave cases |