@ -100,7 +100,7 @@ void KopeteEditGlobalIdentityWidget::setIconSize(int size)
d - > labelPicture - > setMinimumSize ( TQSize ( d - > iconSize , d - > iconSize ) ) ;
d - > labelPicture - > setMinimumSize ( TQSize ( d - > iconSize , d - > iconSize ) ) ;
d - > labelPicture - > setMaximumSize ( TQSize ( d - > iconSize , d - > iconSize ) ) ;
d - > labelPicture - > setMaximumSize ( TQSize ( d - > iconSize , d - > iconSize ) ) ;
if ( ! d - > myself - > photo ( ) . isNull ( ) )
if ( ! d - > myself - > photo ( ) . isNull ( ) )
d - > labelPicture - > setPixmap ( TQPixmap ( d - > myself - > photo ( ) . smoothScale ( d - > iconSize , d - > iconSize , TQ _ ScaleMin) ) ) ;
d - > labelPicture - > setPixmap ( TQPixmap ( d - > myself - > photo ( ) . smoothScale ( d - > iconSize , d - > iconSize , TQ Image: : ScaleMin) ) ) ;
}
}
void KopeteEditGlobalIdentityWidget : : iconSizeChanged ( )
void KopeteEditGlobalIdentityWidget : : iconSizeChanged ( )
@ -115,7 +115,7 @@ void KopeteEditGlobalIdentityWidget::iconSizeChanged()
d - > labelPicture - > setMinimumSize ( TQSize ( d - > iconSize , d - > iconSize ) ) ;
d - > labelPicture - > setMinimumSize ( TQSize ( d - > iconSize , d - > iconSize ) ) ;
d - > labelPicture - > setMaximumSize ( TQSize ( d - > iconSize , d - > iconSize ) ) ;
d - > labelPicture - > setMaximumSize ( TQSize ( d - > iconSize , d - > iconSize ) ) ;
if ( ! d - > myself - > photo ( ) . isNull ( ) )
if ( ! d - > myself - > photo ( ) . isNull ( ) )
d - > labelPicture - > setPixmap ( TQPixmap ( d - > myself - > photo ( ) . smoothScale ( d - > iconSize , d - > iconSize , TQ _ ScaleMin) ) ) ;
d - > labelPicture - > setPixmap ( TQPixmap ( d - > myself - > photo ( ) . smoothScale ( d - > iconSize , d - > iconSize , TQ Image: : ScaleMin) ) ) ;
}
}
}
}
@ -149,7 +149,7 @@ void KopeteEditGlobalIdentityWidget::updateGUI(const TQString &key, const TQVari
// Update the picture and the tooltip
// Update the picture and the tooltip
if ( ! d - > myself - > photo ( ) . isNull ( ) )
if ( ! d - > myself - > photo ( ) . isNull ( ) )
{
{
d - > labelPicture - > setPixmap ( TQPixmap ( d - > myself - > photo ( ) . smoothScale ( d - > iconSize , d - > iconSize , TQ _ ScaleMin) ) ) ;
d - > labelPicture - > setPixmap ( TQPixmap ( d - > myself - > photo ( ) . smoothScale ( d - > iconSize , d - > iconSize , TQ Image: : ScaleMin) ) ) ;
TQToolTip : : add ( d - > labelPicture , " <qt><img src= \" " + value . toString ( ) + " \" ></qt> " ) ;
TQToolTip : : add ( d - > labelPicture , " <qt><img src= \" " + value . toString ( ) + " \" ></qt> " ) ;
}
}
}
}
@ -183,7 +183,7 @@ void KopeteEditGlobalIdentityWidget::photoClicked()
if ( photo . width ( ) > 96 | | photo . height ( ) > 96 )
if ( photo . width ( ) > 96 | | photo . height ( ) > 96 )
{
{
// Scale and crop the picture.
// Scale and crop the picture.
photo = photo . smoothScale ( 96 , 96 , TQ _ ScaleMin ) ;
photo = photo . smoothScale ( 96 , 96 , TQ Image: : ScaleMin ) ;
// crop image if not square
// crop image if not square
if ( photo . width ( ) < photo . height ( ) )
if ( photo . width ( ) < photo . height ( ) )
photo = photo . copy ( ( photo . width ( ) - photo . height ( ) ) / 2 , 0 , 96 , 96 ) ;
photo = photo . copy ( ( photo . width ( ) - photo . height ( ) ) / 2 , 0 , 96 , 96 ) ;
@ -194,7 +194,7 @@ void KopeteEditGlobalIdentityWidget::photoClicked()
else if ( photo . width ( ) < 32 | | photo . height ( ) < 32 )
else if ( photo . width ( ) < 32 | | photo . height ( ) < 32 )
{
{
// Scale and crop the picture.
// Scale and crop the picture.
photo = photo . smoothScale ( 32 , 32 , TQ _ ScaleMin ) ;
photo = photo . smoothScale ( 32 , 32 , TQ Image: : ScaleMin ) ;
// crop image if not square
// crop image if not square
if ( photo . width ( ) < photo . height ( ) )
if ( photo . width ( ) < photo . height ( ) )
photo = photo . copy ( ( photo . width ( ) - photo . height ( ) ) / 2 , 0 , 32 , 32 ) ;
photo = photo . copy ( ( photo . width ( ) - photo . height ( ) ) / 2 , 0 , 32 , 32 ) ;