src/hbcore/image/hbiconengine.cpp
changeset 7 923ff622b8b9
parent 5 627c4a0fd0e7
child 21 4633027730f5
child 34 ed14f46c0e55
--- a/src/hbcore/image/hbiconengine.cpp	Wed Jun 23 18:33:25 2010 +0300
+++ b/src/hbcore/image/hbiconengine.cpp	Tue Jul 06 14:36:53 2010 +0300
@@ -70,7 +70,9 @@
 
     void addBadge(Qt::Alignment alignment,
                   const HbIcon &badge,
-                  int z = 0);
+                  int z,
+                  const QSizeF &sizeFactor,
+                  Qt::AspectRatioMode aspectRatio);
     bool removeBadge(const HbIcon &badge);
     void removeAllBadges();
     const QList<HbBadgeIconInfo> badges() const;
@@ -439,12 +441,14 @@
 
 void HbIconEnginePrivate::addBadge(Qt::Alignment align,
                                    const HbIcon &icon,
-                                   int z)
+                                   int z,
+                                   const QSizeF &sizeFactor,
+                                   Qt::AspectRatioMode aspectRatio)
 {
     if (!badgeInfo) {
         badgeInfo = new HbBadgeIcon();
     }
-    badgeInfo->addBadge(align, icon, z);
+    badgeInfo->addBadge(align, icon, z, sizeFactor, aspectRatio);
 }
 
 bool HbIconEnginePrivate::removeBadge(const HbIcon &badge)
@@ -778,6 +782,9 @@
         } else {
             HbIconLoader *loader = HbIconLoader::global();
             d->defaultSize = loader->defaultSize(name, QString(), d->iconLoaderOptions());
+            if (d->flags & HbIcon::ResolutionCorrected) {
+                HbIconLoader::global()->applyResolutionCorrection(d->defaultSize);
+            }
         }
         // If default size could not get retrieved,
         // store information about that so it does not need to be checked again.
@@ -1175,9 +1182,11 @@
 
 void HbIconEngine::addBadge(Qt::Alignment align,
                             const HbIcon &icon,
-                            int z)
+                            int z,
+                            const QSizeF &sizeFactor,
+                            Qt::AspectRatioMode aspectRatio)
 {
-    d->addBadge(align, icon, z);
+    d->addBadge(align, icon, z, sizeFactor, aspectRatio);
 }
 
 bool HbIconEngine::removeBadge(const HbIcon &badge)