request the the default size for the svg, and a fixed size for the icon

scale down the pixmap if bigger than the icon frame

svn path=/trunk/KDE/kdegraphics/okular/; revision=862805
remotes/origin/old/work/tiff-improvements
Pino Toscano 18 years ago
parent 40a0b9b9a5
commit 0d72c074b6
  1. 5
      ui/annotationwidgets.cpp

@ -107,7 +107,10 @@ void PixmapPreviewSelector::iconComboChanged( const QString& icon )
m_icon = icon;
}
QPixmap pixmap = GuiUtils::loadStamp( m_icon, QSize( m_previewSize, m_previewSize ) );
QPixmap pixmap = GuiUtils::loadStamp( m_icon, QSize(), m_previewSize );
const QRect cr = m_iconLabel->contentsRect();
if ( pixmap.width() > cr.width() || pixmap.height() > cr.height() )
pixmap = pixmap.scaled( cr.size(), Qt::KeepAspectRatio );
m_iconLabel->setPixmap( pixmap );
emit iconChanged( m_icon );

Loading…
Cancel
Save