-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index f173ecc..5472ead 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp @@ -111,14 +111,17 @@ namespace { { if (_dirPix && _dirPix->width()>m_iconsize) { - QPixmap*Pix = new QPixmap(*_dirPix); - Pix->resize(m_iconsize,m_iconsize); - delete _dirPix; - _dirPix = Pix; + QImage Pix = _dirPix->convertToImage(); + *_dirPix = Pix.smoothScale(m_iconsize,m_iconsize); } if (!_cpyPix && _unkPix) { if (_unkPix->width()>=m_iconsize) { - _cpyPix = new QPixmap(*_unkPix); - if (_unkPix->width()>m_iconsize) - _cpyPix->resize(m_iconsize,m_iconsize); + QImage Pix = _unkPix->convertToImage(); + _cpyPix = new QPixmap(); + if (_unkPix->width()>m_iconsize) { + *_cpyPix = Pix.smoothScale(m_iconsize,m_iconsize); + } else { + _cpyPix->convertFromImage(Pix); + } + } else { _cpyPix = new QPixmap(m_iconsize,m_iconsize); |