diff -r e0b83131558d -r 313976a11e23 controlpanelplugins/themeplugin/src/cpthemepreview.cpp --- a/controlpanelplugins/themeplugin/src/cpthemepreview.cpp Fri Jul 23 11:04:51 2010 +0800 +++ b/controlpanelplugins/themeplugin/src/cpthemepreview.cpp Thu Aug 05 11:28:29 2010 +0800 @@ -83,9 +83,10 @@ else { mPreviewIcon = new HbIconItem(mTheme.portraitPreviewIcon(), this); //set to ignore aspect ratio so the layout would rezise the icon correctly. - mPreviewIcon->setAspectRatioMode(Qt::IgnoreAspectRatio); } + mPreviewIcon->setAspectRatioMode(Qt::IgnoreAspectRatio); + // set an object name for preview icon to make it testable for automation testing mPreviewIcon->setObjectName(QString("themePreviewIcon")); @@ -176,7 +177,7 @@ QGraphicsLinearLayout* previewLayout = 0; if(containerLayout) { //get the layout that preview icon belongs to. - previewLayout = dynamic_cast(containerLayout->itemAt(0)); + previewLayout = dynamic_cast(containerLayout->itemAt(1)); } if(previewLayout && mPreviewIcon && mPreviewIcon == dynamic_cast(previewLayout->itemAt(0)) ) { @@ -185,16 +186,16 @@ if(orientation == Qt::Horizontal) { mPreviewIcon->setIcon(mTheme.landscapePreviewIcon()); - mPreviewIcon->setAspectRatioMode(Qt::KeepAspectRatio); } else { mPreviewIcon->setIcon(mTheme.portraitPreviewIcon()); - mPreviewIcon->setAspectRatioMode(Qt::IgnoreAspectRatio); } previewLayout->addItem(mPreviewIcon); } } + +