emailuis/uicomponents/src/fscontrolbuttonvisualiser.cpp
branchRCL_3
changeset 17 67369d1b217f
parent 12 4ce476e64c59
equal deleted inserted replaced
16:b5fbb9b25d57 17:67369d1b217f
  1251     buttonSize -= TPoint( KButtonBorderSize, KButtonBorderSize ); // shrink frame border size
  1251     buttonSize -= TPoint( KButtonBorderSize, KButtonBorderSize ); // shrink frame border size
  1252     
  1252     
  1253     // If there is no text in the button, center the icon to the button
  1253     // If there is no text in the button, center the icon to the button
  1254     if( !iLabelFirstLine || iLabelFirstLine->Text().Length() == 0 )
  1254     if( !iLabelFirstLine || iLabelFirstLine->Text().Length() == 0 )
  1255         {
  1255         {
  1256         TSize oldIconSize = iconA.Size();
  1256         TRect oldIconRect = iconA;
  1257         iconA.SetRect( TPoint( 
  1257         iconA.SetRect( TPoint(( buttonSize.iWidth - oldIconRect.Width())/2,
  1258                             ( buttonSize.iWidth - oldIconSize.iWidth ) / 2, 
  1258                                 oldIconRect.iTl.iY),
  1259                             ( buttonSize.iHeight - oldIconSize.iHeight ) / 2 ),
  1259                                 oldIconRect.Size() );
  1260                             oldIconSize );
  1260         }
  1261         }
       
  1262     
       
  1263     if ( iButtonModel->ContainsElement( ECBElemIconA ) )
  1261     if ( iButtonModel->ContainsElement( ECBElemIconA ) )
  1264         {
  1262         {
  1265         const TSize& size( iconA.Size() );
  1263         const TSize& size( iconA.Size() );
  1266         iIconAContainer->SetSize( size );
  1264         iIconAContainer->SetSize( size );
  1267         iIconAContainer->SetPos( iconA.iTl );
  1265         iIconAContainer->SetPos( iconA.iTl );