Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.3
-
Symbian SDK
-
dabc653c47c3fcdbbe9e59b8e55306bc0a4d8006
Description
If we set a icon on a QAction, the Icon pixmap is only displayed in half.
Example Code:
QAction *refreshAction = new QAction(this); refreshAction->setSoftKeyRole(QAction::PositiveSoftKey); refreshAction->setIcon(style()->standardIcon(QStyle::SP_BrowserReload)); addAction(refreshAction);
Traced the bug in the following component
QPoint QSoftKeyManagerPrivateS60::softkeyIconPosition(int position, QSize sourceSize, QSize targetSize) { QPoint iconPosition(0,0); switch( AknLayoutUtils::CbaLocation() ) { case AknLayoutUtils::EAknCbaLocationBottom: // RSK must be moved to right, LSK in on correct position by default if (position == RSK_POSITION) iconPosition.setX(targetSize.width() - sourceSize.width()); break; case AknLayoutUtils::EAknCbaLocationRight: case AknLayoutUtils::EAknCbaLocationLeft: // Already in correct position default: break; } // Align horizontally to center iconPosition.setY((targetSize.height() - sourceSize.height()) >> 1); return iconPosition; }
The calculation for the Y position messed things up. If I just reset the Y Position to 0, the icon can be seen in full.
I dont know what the component is so I chose Core:Resource System. Please reassign appropriately